Debugging a Vlc dll with GDB.
Pedro Alves
pedro_alves@portugalmail.pt
Fri Dec 7 01:57:00 GMT 2007
Daniel Jacobowitz wrote:
> On Fri, Dec 07, 2007 at 12:28:42AM +0000, Pedro Alves wrote:
>> I could swear there use to be a "pending resolved"
>> notice. Did it go away with the multiple breakpoint
>> location support?
>
> Yes, I believe so. It was mostly there to warn you that the
> breakpoint number had changed, which Vladimir has now fixed.
>
Humm, I found it useful, as in "ok, the breakpoint I set in a
function that will only trigger after I do this, that, and that,
is correctly set". Now, I have to interrupt the inferior and
do an info breakpoints to see if it got in. If the breakpoint
is in a plugin that gets loaded in reaction to some event, its
even worse, as I'll have to poll...
>> if (pending_break_support == AUTO_BOOLEAN_AUTO &&
>> - !nquery ("Make breakpoint pending on future shared library load? "))
>> + !nquery (_("\
>> +Make breakpoint pending on future symbol file addition? ")))
>
> Accurate, but I don't like it much... sounds awkward.
>
> For the rest, I don't really like the churn on messages; would it work
> to just push the error down below *not_found_ptr = 1, and make it a
> NOT_FOUND_ERROR?
>
Yes it works, but do we want both the current error message,
and NOT_FOUND_ERROR message that's already there, but not
triggered currently, which is the message one usually sees?
I guess you mean something like the attached?
In IMHO *this* looks awkward:
>gdb/gdb.exe gdb-stripped.exe
GNU gdb 6.7.50.20071206-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(no debugging symbols found)
(gdb) b main
No symbol table is loaded. Use the "file" command.
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (main) pending.
(gdb) file gdb/gdb.exe
Reading symbols from /home/pedro/gdb/build/gdb/gdb.exe...done.
(gdb) r
Starting program: /home/pedro/gdb/build/gdb/gdb.exe
Breakpoint 1, main (argc=1, argv=0xe336e8) at ../../gdb/src/gdb/gdb.c:28
28 memset (&args, 0, sizeof args);
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x0040107a in main at ../../gdb/src/gdb/gdb.c:28
breakpoint already hit 1 time
(gdb)
Should one really care if there is no symbol table
loaded, as opposed to having symbols for everything else
but what one needs? To me, what's important is that the
symbol I requested isn't found. With the error out of
the way, we'll ask if the user would like to make it
pending on a *shared library* load. But, the user may
know the symbol isn't from a shared lib (like the example
above), get confused, and answer no to the pending query.
--
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending.diff
Type: text/x-diff
Size: 2122 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20071207/51e1a67f/attachment.bin>
More information about the Gdb
mailing list