From: David Lecomber <david@streamline-computing.com>
To: Eli Zaretskii <eliz@gnu.org>, patches <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] Seg fault whilst stepping when watch set [ping!] [in breakpoint.c]
Date: Wed, 03 Nov 2004 12:08:00 -0000 [thread overview]
Message-ID: <1099483707.7521.27.camel@delmo.priv.wark.uk.streamline-computing.com> (raw)
In-Reply-To: <01c4c123$Blat.v2.2.2$ffbe6360@zahav.net.il>
Hi Eli,
Breakpoint 1, 0x08089e8a in main ()
(gdb) step
Single stepping until exit from function main,
which has no line number information.
sample () at f90demo.f90:72
72 CALL MPI_INIT(ierr)
Current language: auto; currently fortran
(gdb) watch i
Hardware watchpoint 2: i
(gdb) n
Error in re-setting breakpoint 2:
No symbol "i" in current context.
{seg fault...} and in the other GDB:
Program received signal SIGSEGV, Segmentation fault.
evaluate_subexp (expect_type=0x0, exp=0x0, pos=0xbfffef34,
noside=EVAL_NORMAL) at eval.c:71
71 return (*exp->language_defn->la_exp_desc->evaluate_exp)
#0 evaluate_subexp (expect_type=0x0, exp=0x0, pos=0xbfffef34,
noside=EVAL_NORMAL) at eval.c:71
#1 0x080d3fa9 in evaluate_expression (exp=0x0) at eval.c:161
#2 0x080c4341 in insert_bp_location (bpt=0x82d8458,
tmp_error_stream=0x82de608, disabled_breaks=0xbfffefd0,
process_warning=0xbfffefd4,
hw_breakpoint_error=0xbfffefd8) at breakpoint.c:949
#3 0x080c45a7 in insert_breakpoints () at breakpoint.c:1149
#4 0x080f43cd in keep_going (ecs=0xbffff0d0) at infrun.c:2716
#5 0x080f2f47 in handle_inferior_event (ecs=0xbffff0d0) at
infrun.c:2543
#6 0x080f270b in wait_for_inferior () at infrun.c:991
#7 0x080f253d in proceed (addr=1, siggnal=TARGET_SIGNAL_DEFAULT,
step=1) at infrun.c:814
#8 0x080efe9b in step_1 (skip_subroutines=1, single_inst=0,
count_string=0x0) at infcmd.c:688
(gdb) p exp
$1 = (struct expression *) 0x0
Looking at frame 2:
#2 0x080c4341 in insert_bp_location (bpt=0x82d8458,
tmp_error_stream=0x82de608, disabled_breaks=0xbfffefd0,
process_warning=0xbfffefd4,
hw_breakpoint_error=0xbfffefd8) at breakpoint.c:949
949 v = evaluate_expression (bpt->owner->exp);
(gdb) p *bpt
$5 = {next = 0x82de5d8, loc_type = bp_loc_hardware_watchpoint, owner =
0x835f3f0, inserted = 0 '\0', duplicate = 0 '\0', address = 0, section =
0x0,
shadow_contents = '\0' <repeats 15 times>, requested_address = 0}
(gdb) p *(bpt->owner)
$6 = {next = 0x83ac680, type = bp_hardware_watchpoint, enable_state =
bp_enabled, disposition = disp_donttouch, number = 2, loc = 0x82d8458,
line_number = 0,
source_file = 0x0, silent = 0 '\0', ignore_count = 0, commands = 0x0,
frame_id = {stack_addr = 0, code_addr = 0, special_addr = 0,
stack_addr_p = 0,
code_addr_p = 0, special_addr_p = 0}, cond = 0x0, addr_string = 0x0,
language = language_fortran, input_radix = 10, cond_string = 0x0,
exp_string = 0x835d408 "i",
exp = 0x0, exp_valid_block = 0x841723c, val = 0x835f8d8, val_chain =
0x0, related_breakpoint = 0x83ac680, watchpoint_frame = {stack_addr =
3221223780,
code_addr = 134526326, special_addr = 0, stack_addr_p = 1,
code_addr_p = 1, special_addr_p = 0}, thread = -1, hit_count = 0,
dll_pathname = 0x0,
triggered_dll_pathname = 0x0, forked_inferior_pid = 0, exec_pathname =
0x0, ops = 0x0, from_tty = 0, flag = 0, pending = 0}
So bpt->owner->exp is clearly null, which makes it a bad idea to
evaluate it ;-)
> If the binary is short, then you could alternatively mail it to me as
> a binary attachment together with the source and instructions how to
> reproduce the crash.
Curiously on Fedora 2 I get a seg fault, and
Error in re-setting breakpoint 2:
No symbol "i" in current context.
But on Redhat 9, I get no segfault but do see the above error repeated 3
times..
With my patch, it works fine, for me ;-)
d.
next prev parent reply other threads:[~2004-11-03 12:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-17 0:09 [PATCH] Seg fault whilst stepping when watch set David Lecomber
2004-10-25 16:10 ` [PATCH] Seg fault whilst stepping when watch set [ping!] David Lecomber
2004-11-01 22:05 ` [PATCH] Seg fault whilst stepping when watch set [ping!] [in breakpoint.c] David Lecomber
2004-11-02 4:38 ` Eli Zaretskii
[not found] ` <1099385491.31287.19.camel@cpc1-oxfd5-5-0-cust86.oxfd.cable.ntl.com>
2004-11-02 21:40 ` Eli Zaretskii
2004-11-03 12:08 ` David Lecomber [this message]
2004-11-17 21:38 ` David Lecomber
2004-11-03 18:09 ` Eli Zaretskii
[not found] <01c4cef8$Blat.v2.2.2$3fd12960@zahav.net.il>
2004-11-21 0:24 ` David Lecomber
2004-11-21 0:42 ` Daniel Jacobowitz
2004-11-21 5:29 ` Eli Zaretskii
2004-11-21 6:48 ` Daniel Jacobowitz
2004-11-21 5:19 ` Eli Zaretskii
2004-11-21 6:49 ` Daniel Jacobowitz
2004-11-21 10:36 ` David Lecomber
2004-11-21 19:40 ` Eli Zaretskii
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=1099483707.7521.27.camel@delmo.priv.wark.uk.streamline-computing.com \
--to=david@streamline-computing.com \
--cc=eliz@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