Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] gdb_continue_to_breakpoint
@ 2008-09-04 20:53 Michael Snyder
  2008-09-04 21:04 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2008-09-04 20:53 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

This one-line change affects two changes that make
gdb_continue_to_breakpoint more useful.

1) If we accept "Breakpoint in" as well as "Breakpoint at",
then it will work for non-debug functions.

2) If we accept trailing text after the $location_pattern,
then we are not forced to include a location pattern that
takes us up to the end of the line.


[-- Attachment #2: lib.txt --]
[-- Type: text/plain, Size: 789 bytes --]

2008-09-04  Michael Snyder  <msnyder@vmware.com>

	* lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
	as "at" (for non-debug functions such as _start).  Also accept
	trailing text after $location_pattern.

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.105
diff -u -p -r1.105 gdb.exp
--- lib/gdb.exp	15 Aug 2008 15:18:34 -0000	1.105
+++ lib/gdb.exp	4 Sep 2008 20:47:58 -0000
@@ -456,7 +456,7 @@ proc gdb_continue_to_breakpoint {name {l
 
     send_gdb "continue\n"
     gdb_expect {
-	-re "Breakpoint .* at $location_pattern\r\n$gdb_prompt $" {
+	-re "Breakpoint .* (at|in) $location_pattern.*$gdb_prompt $" {
 	    pass $full_name
 	}
 	-re ".*$gdb_prompt $" {

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

* Re: [RFA] gdb_continue_to_breakpoint
  2008-09-04 20:53 [RFA] gdb_continue_to_breakpoint Michael Snyder
@ 2008-09-04 21:04 ` Daniel Jacobowitz
  2008-09-04 21:27   ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-09-04 21:04 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Thu, Sep 04, 2008 at 01:52:40PM -0700, Michael Snyder wrote:
> This one-line change affects two changes that make
> gdb_continue_to_breakpoint more useful.
>
> 1) If we accept "Breakpoint in" as well as "Breakpoint at",
> then it will work for non-debug functions.
>
> 2) If we accept trailing text after the $location_pattern,
> then we are not forced to include a location pattern that
> takes us up to the end of the line.
>

> 2008-09-04  Michael Snyder  <msnyder@vmware.com>
> 
> 	* lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
> 	as "at" (for non-debug functions such as _start).  Also accept
> 	trailing text after $location_pattern.

I dunno - when we get symbol handling confused, e.g. we can find a
minsym but not the full symbol, we tend to get the wrong output from
breakpoint messages.  For the second part can you just put the .* at
appropriate callers?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFA] gdb_continue_to_breakpoint
  2008-09-04 21:04 ` Daniel Jacobowitz
@ 2008-09-04 21:27   ` Michael Snyder
  2008-09-04 21:37     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2008-09-04 21:27 UTC (permalink / raw)
  To: Michael Snyder, gdb-patches

Daniel Jacobowitz wrote:
> On Thu, Sep 04, 2008 at 01:52:40PM -0700, Michael Snyder wrote:
>> This one-line change affects two changes that make
>> gdb_continue_to_breakpoint more useful.
>>
>> 1) If we accept "Breakpoint in" as well as "Breakpoint at",
>> then it will work for non-debug functions.
>>
>> 2) If we accept trailing text after the $location_pattern,
>> then we are not forced to include a location pattern that
>> takes us up to the end of the line.
>>
> 
>> 2008-09-04  Michael Snyder  <msnyder@vmware.com>
>>
>>       * lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
>>       as "at" (for non-debug functions such as _start).  Also accept
>>       trailing text after $location_pattern.
> 
> I dunno - when we get symbol handling confused, e.g. we can find a
> minsym but not the full symbol, we tend to get the wrong output from
> breakpoint messages. 

Yabbut, this isn't a test of symbol handling, it's
a test of continuing to a breakpoint.

> For the second part can you just put the .* at
> appropriate callers?

Sure, if you prefer.  So maybe remove the .* but accept
the (in|at)?


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

* Re: [RFA] gdb_continue_to_breakpoint
  2008-09-04 21:27   ` Michael Snyder
@ 2008-09-04 21:37     ` Daniel Jacobowitz
  2008-09-04 22:03       ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-09-04 21:37 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Thu, Sep 04, 2008 at 02:26:17PM -0700, Michael Snyder wrote:
> Yabbut, this isn't a test of symbol handling, it's
> a test of continuing to a breakpoint.

True, though we have a lot of things that are tested 'all over' like
this.

>> For the second part can you just put the .* at
>> appropriate callers?
>
> Sure, if you prefer.  So maybe remove the .* but accept
> the (in|at)?

Yes please.  That part seems fine - it's not like nothing else will
break if we end up unexpectedly without debug info :-).

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFA] gdb_continue_to_breakpoint
  2008-09-04 21:37     ` Daniel Jacobowitz
@ 2008-09-04 22:03       ` Michael Snyder
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2008-09-04 22:03 UTC (permalink / raw)
  To: Michael Snyder, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

Daniel Jacobowitz wrote:
> On Thu, Sep 04, 2008 at 02:26:17PM -0700, Michael Snyder wrote:
>> Yabbut, this isn't a test of symbol handling, it's
>> a test of continuing to a breakpoint.
> 
> True, though we have a lot of things that are tested 'all over' like
> this.
> 
>>> For the second part can you just put the .* at
>>> appropriate callers?
>> Sure, if you prefer.  So maybe remove the .* but accept
>> the (in|at)?
> 
> Yes please.  That part seems fine - it's not like nothing else will
> break if we end up unexpectedly without debug info :-).
> 

OK, revised and committed as attached.
Thanks


[-- Attachment #2: lib.txt --]
[-- Type: text/plain, Size: 738 bytes --]

2008-09-04  Michael Snyder  <msnyder@vmware.com>

	* lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
	as "at" (for non-debug functions such as _start).

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.105
diff -u -p -r1.105 gdb.exp
--- lib/gdb.exp	15 Aug 2008 15:18:34 -0000	1.105
+++ lib/gdb.exp	4 Sep 2008 21:58:38 -0000
@@ -456,7 +456,7 @@ proc gdb_continue_to_breakpoint {name {l
 
     send_gdb "continue\n"
     gdb_expect {
-	-re "Breakpoint .* at $location_pattern\r\n$gdb_prompt $" {
+	-re "Breakpoint .* (at|in) $location_pattern\r\n$gdb_prompt $" {
 	    pass $full_name
 	}
 	-re ".*$gdb_prompt $" {

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

end of thread, other threads:[~2008-09-04 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-04 20:53 [RFA] gdb_continue_to_breakpoint Michael Snyder
2008-09-04 21:04 ` Daniel Jacobowitz
2008-09-04 21:27   ` Michael Snyder
2008-09-04 21:37     ` Daniel Jacobowitz
2008-09-04 22:03       ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox