From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: drow@false.org
Cc: gdb@sources.redhat.com
Subject: Re: huge remote debug traffic with multi-thread program
Date: Fri, 18 Feb 2005 22:54:00 -0000 [thread overview]
Message-ID: <20050218.193333.07644163.nemoto@toshiba-tops.co.jp> (raw)
In-Reply-To: <20050217.104200.93020045.nemoto@toshiba-tops.co.jp>
>>>>> On Thu, 17 Feb 2005 10:42:00 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> said:
anemo> Looking the log, gdbserver keep getting SIGTRAP on 0x00404a78
anemo> (__pthread_wait_for_restart_signal+132). This is a return
anemo> address from __pthread_sigsuspend() which is a stopping place
anemo> of SIGINT (Ctrl-C). I'm wondering why gdb set breakpoint to
anemo> the return address of __pthread_sigsuspend() ...
The reason was gdb is doing software single-step on resuming.
The instruction on stop_pc is 'jr ra' in __pthread_sigsuspend. When
resuming, gdb set breakpoint of the return address to do software
single-stop.
Next question is why gdb try to do single step here. It seems due to
this code in infrun.c:proceed().
712: else if (gdbarch_single_step_through_delay_p (current_gdbarch)
713: && gdbarch_single_step_through_delay (current_gdbarch,
714: get_current_frame ()))
715: /* We stepped onto an instruction that needs to be stepped
716: again before re-inserting the breakpoint, do so. */
717: oneproc = 1;
On mips, gdbarch_single_step_through_delay return 1 for 'jr' instruction.
In gdb 6.3, it was:
732: if (STEP_SKIPS_DELAY_P
732: && breakpoint_here_p (read_pc () + 4)
732: && STEP_SKIPS_DELAY (read_pc ()))
732: oneproc = 1;
and ChangeLog saied:
2004-10-31 Orjan Friberg <organ.friberg@axis.com>
Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (single_step_through_delay): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* config/mips/tm-mips.h (STEP_SKIPS_DELAY_P, STEP_SKIPS_DELAY)
(mips_step_skips_delay): Delete.
* mips-tdep.c (mips_single_step_through_delay): Replace
mips_step_skips_delay.
(mips_gdbarch_init): Set single_step_through_delay.
(mips_dump_tdep): Do not print STEP_SKIPS_DELAY.
It seems "breakpoint_here_p (read_pc() + 4)" test was lost.
Is this intentional?
Thank you.
---
Atsushi Nemoto
next prev parent reply other threads:[~2005-02-18 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 16:24 Atsushi Nemoto
2005-02-17 1:42 ` Daniel Jacobowitz
2005-02-17 9:01 ` Atsushi Nemoto
2005-02-18 22:54 ` Atsushi Nemoto [this message]
2005-02-22 18:59 ` Atsushi Nemoto
2005-03-17 5:43 ` Atsushi Nemoto
2005-03-17 11:38 ` Bob Rossi
2005-03-17 18:21 ` Mark Kettenis
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=20050218.193333.07644163.nemoto@toshiba-tops.co.jp \
--to=anemo@mba.ocn.ne.jp \
--cc=drow@false.org \
--cc=gdb@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