Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Bernie Innocenti <bernie@codewiz.org>
Cc: rms@gnu.org, gdb@sourceware.org
Subject: Re: Debugging X with GDB
Date: Fri, 15 Jan 2010 01:48:00 -0000	[thread overview]
Message-ID: <m3ska8dtqa.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1263421855.11940.86.camel@giskard> (Bernie Innocenti's message 	of "Wed, 13 Jan 2010 17:30:55 -0500")

>>>>> "Bernie" == Bernie Innocenti <bernie@codewiz.org> writes:

Bernie> 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.

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

You could try `set stop-on-solib-events on'.

This isn't as handy as a breakpoint because you can't make it conditional.
IMO, both this and `handle' would be better expressed as `catch'
subcommands (thus allowing conditions and attached commands
automatically) -- but AFAIK nobody is actively working on this.

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

Yes to both.

Tom


      reply	other threads:[~2010-01-15  1:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1NSMSM-0000oT-51@fencepost.gnu.org>
2010-01-11  0:42 ` Bernie Innocenti
2010-01-11 14:02   ` Daniel Jacobowitz
2010-01-11 14:29     ` Jonathan Morton
2010-01-11 15:22       ` Adam Jackson
2010-01-12 10:03         ` Richard Stallman
2010-01-11 20:26       ` [SOLVED] " Bernie Innocenti
     [not found]   ` <E1NUPod-00026Y-78@fencepost.gnu.org>
     [not found]     ` <1263243923.2695.72.camel@giskard>
2010-01-12 23:19       ` Richard Stallman
2010-01-14 22:46         ` Bernie Innocenti
2010-01-15  1:48           ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ska8dtqa.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=bernie@codewiz.org \
    --cc=gdb@sourceware.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox