Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFA/RFC] MI: accept (void) as well as ().
@ 2002-05-08 19:58 Michael Elizabeth Chastain
  2002-05-08 20:11 ` Andrew Cagney
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2002-05-08 19:58 UTC (permalink / raw)
  To: ac131313, msnyder; +Cc: gdb-patches, msnyder

Yes, all my dwarf-2 configurations show type="void (*)(void)", and all my
stabs+ configurations show type="void (*)()".  This is true for both
gcc v2 and gcc v3 compilers.

You can see the characteristic patterns in the attention table:

  http://www.shout.net/pub/mec/sunday/2002-05-05/Attention-gdb-HEAD.html

All five dwarf-2 configurations FAIL on these tests, and all five stabs+
configurations PASS.

Michael C


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [RFA/RFC] MI: accept (void) as well as ().
@ 2002-05-08 20:24 Michael Elizabeth Chastain
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2002-05-08 20:24 UTC (permalink / raw)
  To: ac131313, msnyder; +Cc: gdb-patches, msnyder

mec>   http://www.shout.net/pub/mec/sunday/2002-05-05/Attention-gdb-HEAD.html
ac>    [broken link?]

Doh!

  http://www.shout.net/~mec/sunday/2002-05-05/Attention-gdb-HEAD.html

Michael C


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [RFA/RFC] MI: accept (void) as well as ().
@ 2002-05-08 20:10 Michael Elizabeth Chastain
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2002-05-08 20:10 UTC (permalink / raw)
  To: ac131313, msnyder; +Cc: gdb-patches

Andrew Cagney writes:
> It shouldn't be.  Just want to be sure that the difference isn't 
> something MI can control.  Anyone know?

This might be overkill, so if it is, just ignore me or something ...

I've attached some log excerpts for everyone's enjoyment.  All the dwarf-2
logs look like the first one (gcc 2.95.3, gcc 2.96-rh, gcc 3.0.4,
gcc gcc-3_1-branch%20020505, gcc HEAD%20020505).  All the stabs+ logs look like
the second one (same batch of gcc compilers).

It's definitely a dwarf-2 versus stabs+ issue with argument types in
pointer-to-function, not a v2 versus v3 "void" representation thing.
Look at the _struct_decl declaration.

(The hard part about the test suite is mining half a million test results
and putting it in a form where people can see a pattern).

Michael C

  # target=native, host=i686-pc-linux-gnu%rh-7.2, gdb=HEAD%20020505,
  # gcc=2.95.3, goption=-gdwarf-2

  -var-list-children struct_declarations^M
  ^done,numchild="11",children={child={name="struct_declarations.integer",exp="integer",numchild="0",type="int"},child={name="struct_declarations.character",exp="character",numchild="0",type="char"},child={name="struct_declarations.char_ptr",exp="char_ptr",numchild="1",type="char *"},child={name="struct_declarations.long_int",exp="long_int",numchild="0",type="long int"},child={name="struct_declarations.int_ptr_ptr",exp="int_ptr_ptr",numchild="1",type="int **"},child={name="struct_declarations.long_array",exp="long_array",numchild="10",type="long int [10]"},child={name="struct_declarations.func_ptr",exp="func_ptr",numchild="0",type="void (*)(void)"},child={name="struct_declarations.func_ptr_struct",exp="func_ptr_struct",numchild="0",type="struct _struct_decl (*)(int, char *, long int)"},child={name="struct_declarations.func_ptr_ptr",exp="func_ptr_ptr",numchild="0",type="struct _struct_decl *(*)(int, char *, long int)"},child={name="struct_declarations.u1",exp="u1",numchild="4!
",type="union {...}"},child={name="struct_declarations.s2",exp="s2",numchild="4",type="struct {...}"}}^M
  (gdb) ^M
  FAIL: gdb.mi/mi-var-child.exp: get children of struct_declarations

  # target=native, host=i686-pc-linux-gnu%rh-7.2, gdb=HEAD%20020505,
  # gcc=2.95.3, goption=-gstabs+

  -var-list-children struct_declarations^M
  ^done,numchild="11",children={child={name="struct_declarations.integer",exp="integer",numchild="0",type="int"},child={name="struct_declarations.character",exp="character",numchild="0",type="char"},child={name="struct_declarations.char_ptr",exp="char_ptr",numchild="1",type="char *"},child={name="struct_declarations.long_int",exp="long_int",numchild="0",type="long int"},child={name="struct_declarations.int_ptr_ptr",exp="int_ptr_ptr",numchild="1",type="int **"},child={name="struct_declarations.long_array",exp="long_array",numchild="10",type="long int [10]"},child={name="struct_declarations.func_ptr",exp="func_ptr",numchild="0",type="void (*)()"},child={name="struct_declarations.func_ptr_struct",exp="func_ptr_struct",numchild="0",type="struct _struct_decl (*)()"},child={name="struct_declarations.func_ptr_ptr",exp="func_ptr_ptr",numchild="0",type="struct _struct_decl *(*)()"},child={name="struct_declarations.u1",exp="u1",numchild="4",type="union {...}"},child={name="struct_decl!
arations.s2",exp="s2",numchild="4",type="struct {...}"}}^M
  (gdb) ^M
  PASS: gdb.mi/mi-var-child.exp: get children of struct_declarations


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [RFA/RFC] MI: accept (void) as well as ().
@ 2002-05-08 19:52 Michael Elizabeth Chastain
  2002-05-09 11:26 ` Michael Snyder
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2002-05-08 19:52 UTC (permalink / raw)
  To: gdb-patches, msnyder

Proofread, recommended for approval.
Note: I have no authority in gdb.mi.

There is duplicated code in gdb.mi/mi0-var-child.exp if someone wants
to hit that too.

Michael C


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [RFA/RFC] MI: accept (void) as well as ().
@ 2002-05-08 16:14 Michael Snyder
  2002-05-08 16:39 ` Andrew Cagney
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Snyder @ 2002-05-08 16:14 UTC (permalink / raw)
  To: gdb-patches


This changes a couple of patterns that accept function pointer types.
It allows them to accept (void) in addition to ().

2002-05-08  Michael Snyder  <msnyder@redhat.com>

	* mi-var-child.exp: Accept (void) as well as ().

Index: mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.8
diff -p -r1.8 mi-var-child.exp
*** mi-var-child.exp	5 Feb 2002 23:56:45 -0000	1.8
--- mi-var-child.exp	8 May 2002 23:12:08 -0000
*************** mi_gdb_test "-var-create struct_declarat
*** 74,80 ****
  # STABS doesn't give us argument types for the func ptr structs, but
  # Dwarf 2 does.
  mi_gdb_test "-var-list-children struct_declarations" \
! 	"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numc!
hild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
  	"get children of struct_declarations"
  
  #gdbtk_test c_variable-4.3 {children of struct_declarations} {
--- 74,80 ----
  # STABS doesn't give us argument types for the func ptr structs, but
  # Dwarf 2 does.
  mi_gdb_test "-var-list-children struct_declarations" \
! 	"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr!
\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
  	"get children of struct_declarations"
  
  #gdbtk_test c_variable-4.3 {children of struct_declarations} {
*************** mi_gdb_test "-var-info-num-children stru
*** 444,450 ****
  # Test: c_variable-4.61
  # Desc: children of struct_declarations.s2.u2.u1s1
  mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
! 	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
  	"get children of struct_declarations.s2.u2.u1s1"
  
  # Test: c_variable-4.62
--- 444,450 ----
  # Test: c_variable-4.61
  # Desc: children of struct_declarations.s2.u2.u1s1
  mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
! 	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
  	"get children of struct_declarations.s2.u2.u1s1"
  
  # Test: c_variable-4.62
*************** mi_gdb_test "-var-create weird * weird" 
*** 587,593 ****
  # Test: c_variable-4.82
  # Desc: children of weird
  mi_gdb_test "-var-list-children weird" \
! 	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",n!
umchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
  	"get children of weird"
  
  # Test: c_variable-4.83
--- 587,593 ----
  # Test: c_variable-4.82
  # Desc: children of weird
  mi_gdb_test "-var-list-children weird" \
! 	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\!
"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
  	"get children of weird"
  
  # Test: c_variable-4.83


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

end of thread, other threads:[~2002-05-09 18:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-08 19:58 [RFA/RFC] MI: accept (void) as well as () Michael Elizabeth Chastain
2002-05-08 20:11 ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2002-05-08 20:24 Michael Elizabeth Chastain
2002-05-08 20:10 Michael Elizabeth Chastain
2002-05-08 19:52 Michael Elizabeth Chastain
2002-05-09 11:26 ` Michael Snyder
2002-05-08 16:14 Michael Snyder
2002-05-08 16:39 ` Andrew Cagney
2002-05-08 16:54   ` Michael Snyder
2002-05-08 17:25     ` Andrew Cagney

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