* [PATCH] Correct pascal parser problem.
@ 2002-11-13 1:13 Pierre Muller
2002-11-13 1:17 ` Pierre Muller
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2002-11-13 1:13 UTC (permalink / raw)
To: gdb-patches
The following patch fixes a problem when parsing
expressions that started with fields of this.
If you where in a method that have a filed named owner
that is a pointer,
(gdb) p owner
$1 = (PSYMTABLE) $507a48
(gdb) p owner^
Type TNAMEDINDEXOBJECT has no component named OWNER^.
The problem was that lookup_struct_elt_type
was call with 'OWNER^' instead of only 'OWNER'.
After that patch, I get this:
(gdb) p owner
$3 = (PSYMTABLE) $507a48
(gdb) p owner^
$4 = {NAME = $0, DATASIZE = 0, DATAALIGNMENT = 2, SYMINDEX = $507a78,
DEFINDEX = $507a98, SYMSEARCH = $507ab8, NEXT = $5075f8, DEFOWNER = $507ad8,
ADDRESS_FIXUP = 0, UNITID = 0, SYMTABLELEVEL = 0,
SYMTABLETYPE = RECORDSYMTABLE, _vptr$ = {$4eb2c8, $1}}
which is much better.
ChangeLog entry:
2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
* p-exp.y (name_not_typename): Use copy_name to
set current_type variable for fields of THIS.
diff -u -p -r1.17 p-exp.y
--- p-exp.y 6 Nov 2002 22:48:25 -0000 1.17
+++ p-exp.y 13 Nov 2002 09:04:25 -0000
@@ -649,7 +649,7 @@ variable: name_not_typename
if (this_type)
current_type = lookup_struct_elt_type (
this_type,
- $1.stoken.ptr, false);
+ copy_name($1.stoken), false);
else
current_type = NULL;
}
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Correct pascal parser problem.
2002-11-13 1:13 [PATCH] Correct pascal parser problem Pierre Muller
@ 2002-11-13 1:17 ` Pierre Muller
2002-11-13 7:23 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2002-11-13 1:17 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Cagney
At 10:12 13/11/2002, you wrote:
> The following patch fixes a problem when parsing
>expressions that started with fields of this.
>
> If you where in a method that have a filed named owner
>that is a pointer,
>(gdb) p owner
>$1 = (PSYMTABLE) $507a48
>(gdb) p owner^
>Type TNAMEDINDEXOBJECT has no component named OWNER^.
>
>The problem was that lookup_struct_elt_type
>was call with 'OWNER^' instead of only 'OWNER'.
>
>After that patch, I get this:
>(gdb) p owner
>$3 = (PSYMTABLE) $507a48
>(gdb) p owner^
>$4 = {NAME = $0, DATASIZE = 0, DATAALIGNMENT = 2, SYMINDEX = $507a78,
> DEFINDEX = $507a98, SYMSEARCH = $507ab8, NEXT = $5075f8, DEFOWNER = $507ad8,
> ADDRESS_FIXUP = 0, UNITID = 0, SYMTABLELEVEL = 0,
> SYMTABLETYPE = RECORDSYMTABLE, _vptr$ = {$4eb2c8, $1}}
>which is much better.
Can I also commit this to 5.3 branch or is it too late?
>ChangeLog entry:
>
>2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * p-exp.y (name_not_typename): Use copy_name to
> set current_type variable for fields of THIS.
>
>
>
>diff -u -p -r1.17 p-exp.y
>--- p-exp.y 6 Nov 2002 22:48:25 -0000 1.17
>+++ p-exp.y 13 Nov 2002 09:04:25 -0000
>@@ -649,7 +649,7 @@ variable: name_not_typename
> if (this_type)
> current_type = lookup_struct_elt_type (
> this_type,
>- $1.stoken.ptr, false);
>+ copy_name($1.stoken), false);
> else
> current_type = NULL;
> }
>
>
>
>
>Pierre Muller
>Institut Charles Sadron
>6,rue Boussingault
>F 67083 STRASBOURG CEDEX (France)
>mailto:muller@ics.u-strasbg.fr
>Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Correct pascal parser problem.
2002-11-13 1:17 ` Pierre Muller
@ 2002-11-13 7:23 ` Andrew Cagney
2002-11-13 7:45 ` Pierre Muller
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-11-13 7:23 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> At 10:12 13/11/2002, you wrote:
>
>
>> The following patch fixes a problem when parsing
>>expressions that started with fields of this.
>>
>> If you where in a method that have a filed named owner
>>that is a pointer,
>>(gdb) p owner
>>$1 = (PSYMTABLE) $507a48
>>(gdb) p owner^
>>Type TNAMEDINDEXOBJECT has no component named OWNER^.
>>
>>The problem was that lookup_struct_elt_type
>>was call with 'OWNER^' instead of only 'OWNER'.
>>
>>After that patch, I get this:
>>(gdb) p owner
>>$3 = (PSYMTABLE) $507a48
>>(gdb) p owner^
>>$4 = {NAME = $0, DATASIZE = 0, DATAALIGNMENT = 2, SYMINDEX = $507a78,
>> DEFINDEX = $507a98, SYMSEARCH = $507ab8, NEXT = $5075f8, DEFOWNER = $507ad8,
>> ADDRESS_FIXUP = 0, UNITID = 0, SYMTABLELEVEL = 0,
>> SYMTABLETYPE = RECORDSYMTABLE, _vptr$ = {$4eb2c8, $1}}
>>which is much better.
>
>
> Can I also commit this to 5.3 branch or is it too late?
No, it isn't too late. Still plenty of HIGH priority bug reports (where
GDB doesn't build :-( ).
Andrew
>>ChangeLog entry:
>>
>>2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
>>
>> * p-exp.y (name_not_typename): Use copy_name to
>> set current_type variable for fields of THIS.
>>
>>
>>
>>diff -u -p -r1.17 p-exp.y
>>--- p-exp.y 6 Nov 2002 22:48:25 -0000 1.17
>>+++ p-exp.y 13 Nov 2002 09:04:25 -0000
>>@@ -649,7 +649,7 @@ variable: name_not_typename
>> if (this_type)
>> current_type = lookup_struct_elt_type (
>> this_type,
>>- $1.stoken.ptr, false);
>>+ copy_name($1.stoken), false);
>> else
>> current_type = NULL;
>> }
>>
>>
>>
>>
>>Pierre Muller
>>Institut Charles Sadron
>>6,rue Boussingault
>>F 67083 STRASBOURG CEDEX (France)
>>mailto:muller@ics.u-strasbg.fr
>>Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
>
>
>
>
> Pierre Muller
> Institut Charles Sadron
> 6,rue Boussingault
> F 67083 STRASBOURG CEDEX (France)
> mailto:muller@ics.u-strasbg.fr
> Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Correct pascal parser problem.
2002-11-13 7:23 ` Andrew Cagney
@ 2002-11-13 7:45 ` Pierre Muller
0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2002-11-13 7:45 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
At 16:23 13/11/2002, Andrew Cagney wrote:
>>At 10:12 13/11/2002, you wrote:
>>
>>> The following patch fixes a problem when parsing expressions that started with fields of this.
>>>
>>> If you where in a method that have a filed named owner
>>>that is a pointer,
>>>(gdb) p owner
>>>$1 = (PSYMTABLE) $507a48
>>>(gdb) p owner^
>>>Type TNAMEDINDEXOBJECT has no component named OWNER^.
>>>
>>>The problem was that lookup_struct_elt_type
>>>was call with 'OWNER^' instead of only 'OWNER'.
>>>
>>>After that patch, I get this:
>>>(gdb) p owner
>>>$3 = (PSYMTABLE) $507a48
>>>(gdb) p owner^
>>>$4 = {NAME = $0, DATASIZE = 0, DATAALIGNMENT = 2, SYMINDEX = $507a78,
>>> DEFINDEX = $507a98, SYMSEARCH = $507ab8, NEXT = $5075f8, DEFOWNER = $507ad8,
>>> ADDRESS_FIXUP = 0, UNITID = 0, SYMTABLELEVEL = 0,
>>> SYMTABLETYPE = RECORDSYMTABLE, _vptr$ = {$4eb2c8, $1}}
>>>which is much better.
>>
>>Can I also commit this to 5.3 branch or is it too late?
>
>No, it isn't too late. Still plenty of HIGH priority bug reports (where GDB doesn't build :-( ).
OK, thus I also committed this to 5.3 branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-13 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-13 1:13 [PATCH] Correct pascal parser problem Pierre Muller
2002-11-13 1:17 ` Pierre Muller
2002-11-13 7:23 ` Andrew Cagney
2002-11-13 7:45 ` Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox