This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Fix bug report 11479


>   This is not a direct RFA for two reasons:
[...]
>  2) concerning  the fix in stabsread.c, this chain of different types
>  that all point to the same main type could apparently be something
>  else than just a simple 'const' or 'volatile' modifier.  But I don't
>  think that I know enough about the other possibilities to know if I
>  should exclude them from my patch by checking if only TYPE_CONST and
>  TYPE_VOLATILE are different.

It's OK to post an RFA even if there are questions you don't know how
to answer. If we don't either, then we'll just have to go with what
we have and fix any problem we might find later.

> 2010-04-08  Pierre Muller  <muller@ics.u-strasbg.fr>
> 
> 	* stabsread.c (read_struct_type): Also set length of
> 	other types in the chain.

It would have been useful if you had also provided a copy of the stabs
for us to look at. I think I managed to generate them from the C file
you provided:

        .stabs  "t:p(0,21)=*(0,22)=k(0,23)=xsdummy:",160,0,28,-24

Followed later on by the actual definition:

        .stabs  "dummy:T(0,23)=s16x:(0,1),0,32;y:(0,1),32,32;b:(0,13),64,64;;",128,0,0,0

What I don't get is that the xsdummy should lead to what we call an
undefined type in stabsread.c, which should be put in the undef_types
queue. This queue is then processed at the end to fix all undefined
types, including the various volatile/const variants in the type chain.

Any idea why this is not working this way for your example?

> 2010-04-08  Pierre Muller  <muller@ics.u-strasbg.fr>
> 	Test for bug 11479.
> 	* gdb.stabs/gdb11479.exp: New file.
> 	* gdb.stabs/gdb11479.c: New file.

Just a small cleanup request:

> +# Please email any bugs, comments, and/or additions to this file to:
> +# bug-gdb@gnu.org

I think we decided to remove this from the header - does this email
address even works nowadays?

> +set testfile "gdb11479"
> +set srcfile ${testfile}.c
> +set binfile ${objdir}/${subdir}/${testfile}
> +if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable
> {debug}] != "" } {
> +    untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
> +    return -1
> +}
> +
> +# Start with a fresh gdb.
> +gdb_exit
> +gdb_start
> +gdb_reinitialize_dir $srcdir/$subdir
> +gdb_load ${binfile}

The above can be replaced by:

    set testfile "gdb11479"
    set srcfile ${testfile}.c
    if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
        return -1



> +   Please email any bugs, comments, and/or additions to this file to:
> +   bug-gdb@gnu.org  */

Same as above.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]