* [patch] Re: "optimized out" on gdb.base/gdb1090.exp
[not found] ` <20110412160220.GA18580@host1.jankratochvil.net>
@ 2011-04-12 21:22 ` Edjunior Barbosa Machado
2011-04-13 1:26 ` Yao Qi
2011-04-13 11:15 ` Jan Kratochvil
0 siblings, 2 replies; 4+ messages in thread
From: Edjunior Barbosa Machado @ 2011-04-12 21:22 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Yao Qi, gdb-patches
Thanks Jan for reviewing this. This is the updated patch with the suggested modifications.
Checking out the original PR 1090 that originated this testcase, it doesn't mention any particularity regarding frame or backtrace, which leads me to believe that changing where 'print' is called should not affect the main focus of the testcase.
Thanks,
--
Edjunior
2011-04-12 Edjunior Machado <emachado@br.ibm.com>
* testsuite/gdb.base/gdb1090.exp: change breakpoint location to read the
content of 's24' correctly (avoiding "optimized out").
* testsuite/gdb.base/gdb1090.c: add comment in order to set breakpoint.
diff --git a/gdb/testsuite/gdb.base/gdb1090.c b/gdb/testsuite/gdb.base/gdb1090.c
index 22f2cec..8933952 100644
--- a/gdb/testsuite/gdb.base/gdb1090.c
+++ b/gdb/testsuite/gdb.base/gdb1090.c
@@ -36,7 +36,7 @@ void foo ()
register struct s_2_by_4 s24;
s24.field_0 = 1170;
s24.field_1 = 64701;
- marker (s24);
+ marker (s24); /* break-here */
return;
}
diff --git a/gdb/testsuite/gdb.base/gdb1090.exp b/gdb/testsuite/gdb.base/gdb1090.exp
index a15fd04..ab568ab 100644
--- a/gdb/testsuite/gdb.base/gdb1090.exp
+++ b/gdb/testsuite/gdb.base/gdb1090.exp
@@ -40,11 +40,13 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-if ![runto marker] then {
- perror "couldn't run to breakpoint"
- continue
-}
-gdb_test "up" ".*foo.*" "up from marker"
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 1
+}
+
+gdb_breakpoint [gdb_get_line_number "break-here"]
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
gdb_test_multiple "print s24" "print s24" {
-re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Re: "optimized out" on gdb.base/gdb1090.exp
2011-04-12 21:22 ` [patch] Re: "optimized out" on gdb.base/gdb1090.exp Edjunior Barbosa Machado
@ 2011-04-13 1:26 ` Yao Qi
2011-04-13 11:15 ` Jan Kratochvil
1 sibling, 0 replies; 4+ messages in thread
From: Yao Qi @ 2011-04-13 1:26 UTC (permalink / raw)
To: gdb-patches
On 04/13/2011 05:21 AM, Edjunior Barbosa Machado wrote:
>
> 2011-04-12 Edjunior Machado <emachado@br.ibm.com>
>
> * testsuite/gdb.base/gdb1090.exp: change breakpoint location to
> read the
Please remove spurious spaces between "to" and "read".
> content of 's24' correctly (avoiding "optimized out").
> * testsuite/gdb.base/gdb1090.c: add comment in order to set breakpoint.
^^^^^^^^^ Delete "testsuite/", since this changelog entry will
go to gdb/testsuite/ChangLog.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Re: "optimized out" on gdb.base/gdb1090.exp
2011-04-12 21:22 ` [patch] Re: "optimized out" on gdb.base/gdb1090.exp Edjunior Barbosa Machado
2011-04-13 1:26 ` Yao Qi
@ 2011-04-13 11:15 ` Jan Kratochvil
2011-04-13 21:20 ` Edjunior Barbosa Machado
1 sibling, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2011-04-13 11:15 UTC (permalink / raw)
To: Edjunior Barbosa Machado; +Cc: gdb-patches, Yao Qi
On Tue, 12 Apr 2011 23:21:48 +0200, Edjunior Barbosa Machado wrote:
> Checking out the original PR 1090 that originated this testcase, it doesn't
> mention any particularity regarding frame or backtrace, which leads me to
> believe that changing where 'print' is called should not affect the main
> focus of the testcase.
PR 1090 should have been about "allocate a variable into multiple registers"
which is still being tested so the testcase should be OK even this way.
<2><8d>: Abbrev Number: 8 (DW_TAG_variable)
<8e> DW_AT_name : s24
[...]
<98> DW_AT_location : 6 byte block: 53 93 4 56 93 4 (DW_OP_reg3 (ebx); DW_OP_piece: 4; DW_OP_reg6 (esi); DW_OP_piece: 4)
On Wed, 13 Apr 2011 03:26:11 +0200, Yao Qi wrote:
> On 04/13/2011 05:21 AM, Edjunior Barbosa Machado wrote:
> >
> > 2011-04-12 Edjunior Machado <emachado@br.ibm.com>
> >
> > * testsuite/gdb.base/gdb1090.exp: change breakpoint location to
> > read the
>
> Please remove spurious spaces between "to" and "read".
>
> > content of 's24' correctly (avoiding "optimized out").
> > * testsuite/gdb.base/gdb1090.c: add comment in order to set breakpoint.
> ^^^^^^^^^ Delete "testsuite/", since this changelog entry will
> go to gdb/testsuite/ChangLog.
And the first letter of the sentence should be capital.
http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
Please check it in with those changes.
Thanks,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Re: "optimized out" on gdb.base/gdb1090.exp
2011-04-13 11:15 ` Jan Kratochvil
@ 2011-04-13 21:20 ` Edjunior Barbosa Machado
0 siblings, 0 replies; 4+ messages in thread
From: Edjunior Barbosa Machado @ 2011-04-13 21:20 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches, Yao Qi
On 04/13/2011 08:15 AM, Jan Kratochvil wrote:
> On Tue, 12 Apr 2011 23:21:48 +0200, Edjunior Barbosa Machado wrote:
>> Checking out the original PR 1090 that originated this testcase, it doesn't
>> mention any particularity regarding frame or backtrace, which leads me to
>> believe that changing where 'print' is called should not affect the main
>> focus of the testcase.
>
> PR 1090 should have been about "allocate a variable into multiple registers"
> which is still being tested so the testcase should be OK even this way.
> <2><8d>: Abbrev Number: 8 (DW_TAG_variable)
> <8e> DW_AT_name : s24
> [...]
> <98> DW_AT_location : 6 byte block: 53 93 4 56 93 4 (DW_OP_reg3 (ebx); DW_OP_piece: 4; DW_OP_reg6 (esi); DW_OP_piece: 4)
>
>
> On Wed, 13 Apr 2011 03:26:11 +0200, Yao Qi wrote:
>> On 04/13/2011 05:21 AM, Edjunior Barbosa Machado wrote:
>>>
>>> 2011-04-12 Edjunior Machado<emachado@br.ibm.com>
>>>
>>> * testsuite/gdb.base/gdb1090.exp: change breakpoint location to
>>> read the
>>
>> Please remove spurious spaces between "to" and "read".
>>
>>> content of 's24' correctly (avoiding "optimized out").
>>> * testsuite/gdb.base/gdb1090.c: add comment in order to set breakpoint.
>> ^^^^^^^^^ Delete "testsuite/", since this changelog entry will
>> go to gdb/testsuite/ChangLog.
>
> And the first letter of the sentence should be capital.
> http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
>
> Please check it in with those changes.
>
>
> Thanks,
> Jan
>
Thanks Jan and Yao Qi for the feedback. Checked in with the mentioned changes:
http://sourceware.org/ml/gdb-cvs/2011-04/msg00083.html
--
Edjunior
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-13 21:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4DA3A7D0.2000701@linux.vnet.ibm.com>
[not found] ` <4DA3B701.3060902@codesourcery.com>
[not found] ` <4DA4573D.1040101@linux.vnet.ibm.com>
[not found] ` <20110412160220.GA18580@host1.jankratochvil.net>
2011-04-12 21:22 ` [patch] Re: "optimized out" on gdb.base/gdb1090.exp Edjunior Barbosa Machado
2011-04-13 1:26 ` Yao Qi
2011-04-13 11:15 ` Jan Kratochvil
2011-04-13 21:20 ` Edjunior Barbosa Machado
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox