Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org,  Pierre Muller <muller@ics.u-strasbg.fr>
Subject: Re: [RFC] Remove last occurences of target_{insert/remove}_watchpoint
Date: Wed, 06 May 2009 18:58:00 -0000	[thread overview]
Message-ID: <200905061958.26007.pedro@codesourcery.com> (raw)
In-Reply-To: <20090506183542.GQ10734@adacore.com>

On Wednesday 06 May 2009 19:35:42, Joel Brobecker wrote:
> Yeah, I have roughly the same number of hits for that one.
> That leaves another thousand of so errors. As far as I can tell,
> they are made of several different symptoms: ~100 internal-errors,
> about a 100 are caused by the fact that we failed to run the program
> or ran the program to completion, etc etc etc.

I think that those other problems may be related to the issue
I mentioned on IRC the other day.  The fact that the procfs.c
code that sets a breakpoint at __dbx_link during the startup phase
is broken.  I'll paste it here for posterity.  :-)

- That breakpoint was set during the startup phase by catching
  syscall-exits during the startup phase, more precisely, during
  the phase that the inferior is ran through the dynamic linker in
  solib_create_inferior_hook -> irix_solib_create_inferior_hook.

  This was done by enabling PR_SYSEXIT syscall tracing in procfs_init_inferior,
  and disabling after fork_inferior returned.  Look for SYS_syssgi in
  procfs.c to see this. 

  This worked because many moons ago, at the time that code was
  written, fork_inferior used to call solib_create_inferior_hook before
  returning.

  http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/fork-child.c.diff?r1=1.28&r2=1.27.6.1&cvsroot=src&f=h

- Problem is, that now, solib_create_inferior is only called *after* all of this, in
  post_create_inferior.  So the wrapping to catch syscall-exits is being done
  at the wrong place.

- You probably need to delay disabling catching syscall-exits/looking
  for __dbx_link into the inferior_created observer, instead of disabling
  it at the end of procfs_create_inferior.

> I can send you the gdb.log file if you're interested. I suspect not ;-).

Not.  :-)

-- 
Pedro Alves


      reply	other threads:[~2009-05-06 18:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 23:13 Pierre Muller
2009-04-23 18:36 ` Joel Brobecker
2009-04-29 23:00 ` Pedro Alves
2009-05-04 19:32   ` Pedro Alves
2009-05-06 16:54     ` Joel Brobecker
2009-05-06 17:14       ` Pedro Alves
2009-05-06 18:35         ` Joel Brobecker
2009-05-06 18:58           ` Pedro Alves [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=200905061958.26007.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=muller@ics.u-strasbg.fr \
    /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