Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: cagney@gnu.org
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Use insert_step_resume_breakpoint everywhere
Date: Wed, 12 May 2004 20:29:00 -0000	[thread overview]
Message-ID: <200405122029.i4CKT0r4006056@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <40A161F4.6050801@gnu.org>

   Date: Tue, 11 May 2004 19:29:56 -0400
   From: Andrew Cagney <cagney@gnu.org>

   Further testing revealed an additional bug in this assertion (next vs 
   nexti) vis:

   +  /* Remember, if the call instruction is the last in the step range,
   +     the breakpoint will land just beyond that.  Hence ``<=
   +     step_range_end''.  Also, ignore check when "nexti".  */
   +  gdb_assert (step_range_start == step_range_end
   +             || (get_frame_pc (step_frame) >= step_range_start
   +                 && get_frame_pc (step_frame) <= step_range_end));

   So I've tweaked that and checked it in.

   Andrew

   > 2004-05-10  Andrew Cagney  <cagney@redhat.com>
   > 
   > 	* infrun.c (step_over_function): Delete function.
   > 	(handle_step_into_function): Use insert_step_resume_breakpoint.
   > 	(insert_step_resume_breakpoint): Fix assertion.
   > 

This patch, or one of your other patches breaks FreeBSD signal
trampoline handling.  I now get:

32      } /* handler */
1: x/i $pc  0x8048545 <handler+13>:     leave  
(gdb) step
../../src/gdb/infrun.c:2672: internal-error: insert_step_resume_breakpoint: Asse
rtion `frame_id_eq (step_frame_id, get_frame_id (step_frame))' failed.
A problem internal to GDB has been detected,
FAIL: gdb.base/siginfo.exp: step out of handler (GDB internal error)

when running the testsuite.  Looks like we're setting a step-resume
breakpoint when one is already set.  The backtrace at this point is:

#0  internal_error (file=0x81b9f76 "../../src/gdb/infrun.c", line=2672, 
    string=0x81b9ff5 "%s: Assertion `%s' failed.") at ../../src/gdb/utils.c:836
#1  0x080b6e9a in insert_step_resume_breakpoint (step_frame=0x825e0fc, 
    ecs=0xbfbfef5c) at ../../src/gdb/infrun.c:2672
#2  0x080b5783 in handle_step_into_function (ecs=0xbfbfef5c)
    at ../../src/gdb/infrun.c:1253
#3  0x080b6a00 in handle_inferior_event (ecs=0xbfbfef5c)
    at ../../src/gdb/infrun.c:2420
#4  0x080b52e0 in wait_for_inferior () at ../../src/gdb/infrun.c:1022
#5  0x080b515b in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT, 
    step=1) at ../../src/gdb/infrun.c:841
#6  0x080b2956 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)
    at ../../src/gdb/infcmd.c:661
#7  0x080b26ed in step_command (count_string=0x0, from_tty=1)
    at ../../src/gdb/infcmd.c:549

The value of step_frame_id indicates that we were stepping in handler,
and then try to set a step-resume breakpoint in main.  It might be
relevant to note that on FreeBSD, the signal trampoline calls the
handler, and that signal trampoline is provided by the kernel so we
don't have debug info for it.

Mark


  reply	other threads:[~2004-05-12 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <40A01953.7060906@gnu.org>
2004-05-11 23:29 ` Andrew Cagney
2004-05-12 20:29   ` Mark Kettenis [this message]
2004-05-12 20:47     ` Andrew Cagney
2004-05-13 19:40       ` [commit] Check undebuggable after sigtramp; Was: [patch/rfc] Useinsert_step_resume_breakpoint everywhere Andrew Cagney

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=200405122029.i4CKT0r4006056@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /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