public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Dummy Breakpoint Priority
@ 2003-06-26 12:00 Thomas,Stephen
  2003-06-26 17:47 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas,Stephen @ 2003-06-26 12:00 UTC (permalink / raw)
  To: gdb; +Cc: Bowers, Antony, McGoogan,Sean

Hi,

I am currently porting gdb to the new SuperH SH5 architecture. I have just hit a problem, which sounds exactly the same as that reported on 31 Aug 2001 (by Jiri Smid, titled 'Dummy Breakpoint Priority').

When a target function is called from the command line, a special dummy breakpoint is inserted at the program entry point. (We have CALL_DUMMY_LOCATION defined as AT_ENTRY_POINT). Trouble is, when the program is statically linked, gdb has already placed an internal breakpoint at _start, of type bp_shlib_event. On return from the function, this causes bpstat_what() in breakpoint.c to return an action which causes gdb to carry on executing (what.main_action = BPSTAT_WHAT_CHECK_SHLIBS).

The reply to Jiri Smid's mail asked why solib-svr4.c was setting a bp on the entry point. But it looks like this is the normal thing for gdb to do - I verified that x86 gdb does the same thing (it doesn't suffer from this problem though because it doesn't use AT_ENTRY_POINT).

So please can anyone tell me what the resolution of this problem was?
NB: Please reply using 'Reply All' as I am leaving SuperH shortly...

Thanks,

Steve Thomas
SuperH (UK) Ltd.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: Dummy Breakpoint Priority
@ 2003-06-27  9:24 Thomas,Stephen
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas,Stephen @ 2003-06-27  9:24 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb, Bowers, Antony, McGoogan,Sean

Hi Andrew,

In the version I'm using (V5.2.1), i386 used ON_STACK. I actually verified (using gdb!) that x86 gdb really did set a bp of type bp_shlib_event at _start.

But I just checked the latest sources, & can't find a setting anywhere for call dummy location. So it looks like i386 uses the default, i.e. AT_ENTRY_POINT (now set in gdbarch.c). Can you verify that the latest gdb doesn't suffer from the same problem? To reproduce, you need to call function in a statically linked program.

Thanks,

Steve Thomas
SuperH (UK) Ltd.

-----Original Message-----
From: Andrew Cagney [mailto:ac131313@redhat.com] 
Sent: 26 June 2003 18:47
To: Thomas,Stephen
Cc: gdb@sources.redhat.com; Bowers, Antony; McGoogan,Sean
Subject: Re: Dummy Breakpoint Priority


> Hi,
> 
> I am currently porting gdb to the new SuperH SH5 architecture. I have 
> just hit a problem, which sounds exactly the same as that reported on 
> 31 Aug 2001 (by Jiri Smid, titled 'Dummy Breakpoint Priority').
> 
> When a target function is called from the command line, a special 
> dummy breakpoint is inserted at the program entry point. (We have 
> CALL_DUMMY_LOCATION defined as AT_ENTRY_POINT). Trouble is, when the 
> program is statically linked, gdb has already placed an internal 
> breakpoint at _start, of type bp_shlib_event. On return from the 
> function, this causes bpstat_what() in breakpoint.c to return an 
> action which causes gdb to carry on executing (what.main_action = 
> BPSTAT_WHAT_CHECK_SHLIBS).
> 
> The reply to Jiri Smid's mail asked why solib-svr4.c was setting a bp 
> on the entry point. But it looks like this is the normal thing for gdb 
> to do - I verified that x86 gdb does the same thing (it doesn't suffer 
> from this problem though because it doesn't use AT_ENTRY_POINT).

Are you sure that the i386 isn't using at AT_ENTRY_POINT?

> So please can anyone tell me what the resolution of this problem was?
> NB: Please reply using 'Reply All' as I am leaving SuperH shortly...

I'm puzzled to.

Andrew


^ permalink raw reply	[flat|nested] 5+ messages in thread
* dummy breakpoint priority
@ 2001-08-31  3:49 Jiri Smid
  2001-08-31  8:42 ` Kevin Buettner
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Smid @ 2001-08-31  3:49 UTC (permalink / raw)
  To: gdb

  Hello,

  I have a problem with using generic dummy frames
(call_dummy_location - AT_ENTRY_POINT) together with solib-svr4.c.
  At the entry point a breakpoint is created by solib-svr4.c and when
I call hand_function_call() another breakpoint is created at the same place.
  The priority of breakpoints (table in breakpoint.c:bpstat_what())
defines that the main action in this case is BPSTAT_WHAT_CHECK_SHLIBS.
  This leads to the result that execution continues and sigsegvs.
  Shouldn't the dummy breakpoint have higher priority?

-- 
Jiri Smid

---------------------------------------------------------------------
SuSE CR, s.r.o.                                 e-mail: smid@suse.cz
Drahobejlova 27                                tel:+420 2 83095 373
190 00 Praha 9                                 fax:+420 2 83095 374
Ceska republika                                http://www.suse.cz

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-27  8:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 12:00 Dummy Breakpoint Priority Thomas,Stephen
2003-06-26 17:47 ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2003-06-27  9:24 Thomas,Stephen
2001-08-31  3:49 dummy breakpoint priority Jiri Smid
2001-08-31  8:42 ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).