Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFA]: Fix jmain.exp to xfail for break at main
@ 2004-07-08 19:01 Michael Elizabeth Chastain
  2004-07-08 19:41 ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Elizabeth Chastain @ 2004-07-08 19:01 UTC (permalink / raw)
  To: jjohnstn; +Cc: cagney, gdb-patches, mec.gnu

> See attached patch.  Ok to commit?

It makes me happy.  Recommended for approval.
It's up to Andrew to approve or not.

Michael C

===

Index: gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.1
diff -u -p -r1.1 jmain.exp
--- gdb.java/jmain.exp	27 Jun 2004 00:41:39 -0000	1.1
+++ gdb.java/jmain.exp	8 Jul 2004 18:16:45 -0000
@@ -48,7 +48,7 @@ gdb_test "set print sevenbit-strings" ".
 
 # Where the breakpoint should always land
 
-set bpmain "Breakpoint .* file .*jmain.java, line 6\."
+set bpmain "Breakpoint .* file .*jmain.java, line 5\."
 
 gdb_load "${binfile}"
 setup_kfail *-*-* java/1567
@@ -63,4 +63,5 @@ gdb_test "break jmain.main" "${bpmain}"
 
 # Check that a fully qualified "main" works.
 gdb_load "${binfile}"
+setup_xfail *-*-* gcc/16439
 gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"

--------------000805000701000707020104--



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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
  2004-07-08 19:01 [RFA]: Fix jmain.exp to xfail for break at main Michael Elizabeth Chastain
@ 2004-07-08 19:41 ` Andrew Cagney
  2004-07-08 21:01   ` Jeff Johnston
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2004-07-08 19:41 UTC (permalink / raw)
  To: jjohnstn; +Cc: Michael Elizabeth Chastain, gdb-patches

>>See attached patch.  Ok to commit?
> 
> 
> It makes me happy.  Recommended for approval.
> It's up to Andrew to approve or not.
> 
> Michael C

M'kay (don't forget the changelog :-)

Andrew

> Index: gdb.java/jmain.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
> retrieving revision 1.1
> diff -u -p -r1.1 jmain.exp
> --- gdb.java/jmain.exp	27 Jun 2004 00:41:39 -0000	1.1
> +++ gdb.java/jmain.exp	8 Jul 2004 18:16:45 -0000
> @@ -48,7 +48,7 @@ gdb_test "set print sevenbit-strings" ".
>  
>  # Where the breakpoint should always land
>  
> -set bpmain "Breakpoint .* file .*jmain.java, line 6\."
> +set bpmain "Breakpoint .* file .*jmain.java, line 5\."
>  
>  gdb_load "${binfile}"
>  setup_kfail *-*-* java/1567
> @@ -63,4 +63,5 @@ gdb_test "break jmain.main" "${bpmain}"
>  
>  # Check that a fully qualified "main" works.
>  gdb_load "${binfile}"
> +setup_xfail *-*-* gcc/16439
>  gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"
> 
> --------------000805000701000707020104--
> 
> 
> 


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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
  2004-07-08 19:41 ` Andrew Cagney
@ 2004-07-08 21:01   ` Jeff Johnston
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff Johnston @ 2004-07-08 21:01 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Michael Elizabeth Chastain, gdb-patches

Andrew Cagney wrote:
>>> See attached patch.  Ok to commit?
>>
>>
>>
>> It makes me happy.  Recommended for approval.
>> It's up to Andrew to approve or not.
>>
>> Michael C
> 
> 
> M'kay (don't forget the changelog :-)
>

I didn't.  Patch checked in.

-- Jeff J.

> Andrew
> 
>> Index: gdb.java/jmain.exp
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
>> retrieving revision 1.1
>> diff -u -p -r1.1 jmain.exp
>> --- gdb.java/jmain.exp    27 Jun 2004 00:41:39 -0000    1.1
>> +++ gdb.java/jmain.exp    8 Jul 2004 18:16:45 -0000
>> @@ -48,7 +48,7 @@ gdb_test "set print sevenbit-strings" ".
>>  
>>  # Where the breakpoint should always land
>>  
>> -set bpmain "Breakpoint .* file .*jmain.java, line 6\."
>> +set bpmain "Breakpoint .* file .*jmain.java, line 5\."
>>  
>>  gdb_load "${binfile}"
>>  setup_kfail *-*-* java/1567
>> @@ -63,4 +63,5 @@ gdb_test "break jmain.main" "${bpmain}"
>>  
>>  # Check that a fully qualified "main" works.
>>  gdb_load "${binfile}"
>> +setup_xfail *-*-* gcc/16439
>>  gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"
>>
>> --------------000805000701000707020104--
>>
>>
>>
> 
> 


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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
  2004-07-08 18:20   ` Jeff Johnston
@ 2004-07-16 21:09     ` Andrew Cagney
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Cagney @ 2004-07-16 21:09 UTC (permalink / raw)
  To: Jeff Johnston; +Cc: Michael Elizabeth Chastain, gdb-patches

> It gives line 4.  I meant to imply that above when I said "since 3.4", but I'll clarify it here.  For a similar C test case, it points to the return statement.  It definitely should not be line 6 in any circumstance.

Right, it should match C.

> See attached patch.  Ok to commit?

M'kay,
Andrew



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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
  2004-07-08 15:34 ` Jeff Johnston
@ 2004-07-08 18:20   ` Jeff Johnston
  2004-07-16 21:09     ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Johnston @ 2004-07-08 18:20 UTC (permalink / raw)
  To: Jeff Johnston; +Cc: Michael Elizabeth Chastain, cagney, gdb-patches

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

Jeff Johnston wrote:
> Michael Elizabeth Chastain wrote:
> 
>> jj> Currently, the gdb.java/jmain.exp test has hard-coded line 6 as the
>> jj> expected line number for a break at jmain.main (java.lang.String[]).
>> jj> This occurs for gcc 3.3 and is incorrect.  Line 6 is the end brace 
>> for
>> jj> the main routine.  As of gcc 3.4, the line number is reported to 
>> be line
>> jj> 4.  This also isn't what gdb wants as this points to the open brace.
>> jj> The desired result is that we point to line 5 which is the first 
>> line in
>> jj> main (return statement).  That said, I have changed the expected 
>> line to
>> jj> be 5 and set the test as an XFAIL.
>>
>> Dunno what Andrew will say about this patch but I don't think it's good.
>>
> 
> I did talk to Andrew briefly about this.
> 
>> XFAIL means 'external fail'.  If you add an XFAIL to the test suite, I
>> want to see more analysis about what the bug is -- the best thing is an
>> actual gcc PR number.  In the gcc PR is a copy of jmain.java and the
>> assembly language output and an explanation of why the assembly language
>> output is incorrect.
>>
>> What does gcc HEAD do?
>>
> 
> It gives line 4.  I meant to imply that above when I said "since 3.4", 
> but I'll clarify it here.  For a similar C test case, it points to the 
> return statement.  It definitely should not be line 6 in any circumstance.
> 
>> If gcc HEAD actually gives line 5, then I would do this in the test
>> script:
>>
>>   # gcc HEAD 2004-07-05 marks the first line as 5, which is correct.
>>   # gcc 3.3.4 -gdwarf-2 marks the first line as line 6.
>>   # gcc 3.4.1 -gdwarf-2 marks the first line as line 4.
>>   set bpmain "Breakpoint .* file .*jmain.java, line 5\."
>>
>> If gcc HEAD gives some other line, then I think you need to file
>> a PR against gcc.  It may be low priority and not fixed for years,
>> in which case you can XFAIL the test with that PR number.
>>
> 
> Ok, I will create the PR and resubmit the patch.
> 

See attached patch.  Ok to commit?


>> Michael C
>>
>> ===
>>
>> 2004-07-07  Jeff Johnston  <jjohnstn@redhat.com>
>>
>>          * gdb.java/jmain.exp: Fix expected line number for main to
>>          break at.  Set XFAIL for break at main test since gcj does not
>>          provide line number info for first statement in main.
>>
> 
> 

[-- Attachment #2: jmain-test.patch --]
[-- Type: text/plain, Size: 809 bytes --]

Index: gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.1
diff -u -p -r1.1 jmain.exp
--- gdb.java/jmain.exp	27 Jun 2004 00:41:39 -0000	1.1
+++ gdb.java/jmain.exp	8 Jul 2004 18:16:45 -0000
@@ -48,7 +48,7 @@ gdb_test "set print sevenbit-strings" ".
 
 # Where the breakpoint should always land
 
-set bpmain "Breakpoint .* file .*jmain.java, line 6\."
+set bpmain "Breakpoint .* file .*jmain.java, line 5\."
 
 gdb_load "${binfile}"
 setup_kfail *-*-* java/1567
@@ -63,4 +63,5 @@ gdb_test "break jmain.main" "${bpmain}"
 
 # Check that a fully qualified "main" works.
 gdb_load "${binfile}"
+setup_xfail *-*-* gcc/16439
 gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"

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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
  2004-07-08  3:42 Michael Elizabeth Chastain
@ 2004-07-08 15:34 ` Jeff Johnston
  2004-07-08 18:20   ` Jeff Johnston
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Johnston @ 2004-07-08 15:34 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: cagney, gdb-patches

Michael Elizabeth Chastain wrote:
> jj> Currently, the gdb.java/jmain.exp test has hard-coded line 6 as the
> jj> expected line number for a break at jmain.main (java.lang.String[]).
> jj> This occurs for gcc 3.3 and is incorrect.  Line 6 is the end brace for
> jj> the main routine.  As of gcc 3.4, the line number is reported to be line
> jj> 4.  This also isn't what gdb wants as this points to the open brace.
> jj> The desired result is that we point to line 5 which is the first line in
> jj> main (return statement).  That said, I have changed the expected line to
> jj> be 5 and set the test as an XFAIL.
> 
> Dunno what Andrew will say about this patch but I don't think it's good.
> 

I did talk to Andrew briefly about this.

> XFAIL means 'external fail'.  If you add an XFAIL to the test suite, I
> want to see more analysis about what the bug is -- the best thing is an
> actual gcc PR number.  In the gcc PR is a copy of jmain.java and the
> assembly language output and an explanation of why the assembly language
> output is incorrect.
> 
> What does gcc HEAD do?
> 

It gives line 4.  I meant to imply that above when I said "since 3.4", but I'll 
clarify it here.  For a similar C test case, it points to the return statement. 
  It definitely should not be line 6 in any circumstance.

> If gcc HEAD actually gives line 5, then I would do this in the test
> script:
> 
>   # gcc HEAD 2004-07-05 marks the first line as 5, which is correct.
>   # gcc 3.3.4 -gdwarf-2 marks the first line as line 6.
>   # gcc 3.4.1 -gdwarf-2 marks the first line as line 4.
>   set bpmain "Breakpoint .* file .*jmain.java, line 5\."
> 
> If gcc HEAD gives some other line, then I think you need to file
> a PR against gcc.  It may be low priority and not fixed for years,
> in which case you can XFAIL the test with that PR number.
> 

Ok, I will create the PR and resubmit the patch.

> Michael C
> 
> ===
> 
> 2004-07-07  Jeff Johnston  <jjohnstn@redhat.com>
> 
>          * gdb.java/jmain.exp: Fix expected line number for main to
>          break at.  Set XFAIL for break at main test since gcj does not
>          provide line number info for first statement in main.
> 


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

* Re: [RFA]: Fix jmain.exp to xfail for break at main
@ 2004-07-08  3:42 Michael Elizabeth Chastain
  2004-07-08 15:34 ` Jeff Johnston
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Elizabeth Chastain @ 2004-07-08  3:42 UTC (permalink / raw)
  To: cagney, gdb-patches, jjohnstn

jj> Currently, the gdb.java/jmain.exp test has hard-coded line 6 as the
jj> expected line number for a break at jmain.main (java.lang.String[]).
jj> This occurs for gcc 3.3 and is incorrect.  Line 6 is the end brace for
jj> the main routine.  As of gcc 3.4, the line number is reported to be line
jj> 4.  This also isn't what gdb wants as this points to the open brace.
jj> The desired result is that we point to line 5 which is the first line in
jj> main (return statement).  That said, I have changed the expected line to
jj> be 5 and set the test as an XFAIL.

Dunno what Andrew will say about this patch but I don't think it's good.

XFAIL means 'external fail'.  If you add an XFAIL to the test suite, I
want to see more analysis about what the bug is -- the best thing is an
actual gcc PR number.  In the gcc PR is a copy of jmain.java and the
assembly language output and an explanation of why the assembly language
output is incorrect.

What does gcc HEAD do?

If gcc HEAD actually gives line 5, then I would do this in the test
script:

  # gcc HEAD 2004-07-05 marks the first line as 5, which is correct.
  # gcc 3.3.4 -gdwarf-2 marks the first line as line 6.
  # gcc 3.4.1 -gdwarf-2 marks the first line as line 4.
  set bpmain "Breakpoint .* file .*jmain.java, line 5\."

If gcc HEAD gives some other line, then I think you need to file
a PR against gcc.  It may be low priority and not fixed for years,
in which case you can XFAIL the test with that PR number.

Michael C

===

2004-07-07  Jeff Johnston  <jjohnstn@redhat.com>

         * gdb.java/jmain.exp: Fix expected line number for main to
         break at.  Set XFAIL for break at main test since gcj does not
         provide line number info for first statement in main.


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

* [RFA]: Fix jmain.exp to xfail for break at main
@ 2004-07-07 20:23 Jeff Johnston
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff Johnston @ 2004-07-07 20:23 UTC (permalink / raw)
  To: gdb-patches

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

Currently, the gdb.java/jmain.exp test has hard-coded line 6 as the expected 
line number for a break at jmain.main (java.lang.String[]).  This occurs for gcc 
3.3 and is incorrect.  Line 6 is the end brace for the main routine.  As of gcc 
3.4, the line number is reported to be line 4.  This also isn't what gdb wants 
as this points to the open brace.  The desired result is that we point to line 5 
which is the first line in main (return statement).  That said, I have changed 
the expected line to be 5 and set the test as an XFAIL.

Tested on x86 RHEL3.

Ok?

-- Jeff J.


2004-07-07  Jeff Johnston  <jjohnstn@redhat.com>

         * gdb.java/jmain.exp: Fix expected line number for main to
         break at.  Set XFAIL for break at main test since gcj does not
         provide line number info for first statement in main.


[-- Attachment #2: jmain-test.patch --]
[-- Type: text/plain, Size: 799 bytes --]

Index: gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.1
diff -u -p -r1.1 jmain.exp
--- gdb.java/jmain.exp	27 Jun 2004 00:41:39 -0000	1.1
+++ gdb.java/jmain.exp	7 Jul 2004 20:13:08 -0000
@@ -48,7 +48,7 @@ gdb_test "set print sevenbit-strings" ".
 
 # Where the breakpoint should always land
 
-set bpmain "Breakpoint .* file .*jmain.java, line 6\."
+set bpmain "Breakpoint .* file .*jmain.java, line 5\."
 
 gdb_load "${binfile}"
 setup_kfail *-*-* java/1567
@@ -63,4 +63,5 @@ gdb_test "break jmain.main" "${bpmain}"
 
 # Check that a fully qualified "main" works.
 gdb_load "${binfile}"
+setup_xfail *-*-*
 gdb_test "break \'${testfile}.main(java.lang.String\[\])\'" "${bpmain}"

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

end of thread, other threads:[~2004-07-16 21:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 19:01 [RFA]: Fix jmain.exp to xfail for break at main Michael Elizabeth Chastain
2004-07-08 19:41 ` Andrew Cagney
2004-07-08 21:01   ` Jeff Johnston
  -- strict thread matches above, loose matches on Subject: below --
2004-07-08  3:42 Michael Elizabeth Chastain
2004-07-08 15:34 ` Jeff Johnston
2004-07-08 18:20   ` Jeff Johnston
2004-07-16 21:09     ` Andrew Cagney
2004-07-07 20:23 Jeff Johnston

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