This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Debugging X with GDB


On Tue, 2010-01-12 at 18:19 -0500, Richard Stallman wrote:
> That is good, but GDB knew to recognize that the driver file was being
> loaded even with old X server.  Given that it could recognize the
> file, it could also offer a command to specify "stop the program after
> loading file FOO".  That will be useful when strange things are
> happening.

I thought we could easily do that by just setting a breakpoint on
dlopen(), but it didn't seem to work for the X server, perhaps because
the old, hand-crafted dynamic loader did not call dlopen() at all.
Perhaps mmap() would have worked or, as a last resort, open().

gdb supports setting conditional expressions on breakpoints, but I'm not
sure they can be used on function arguments and if basic string
manipulation is supported.

Ideally, we'd want to have the moral equivalent of

  break dlopen if strstr(filename, "siliconmotion_drv")

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]