Bug 17835 - gdb fails to find members of current object/class (this / self) / case-sensitivity issue
Summary: gdb fails to find members of current object/class (this / self) / case-sensit...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.8
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-12 23:21 UTC by Martin
Modified: 2015-08-31 10:20 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2015-01-12 23:21:56 UTC
This issue is present in gdb 7.7 and 7.8 (it worked fine with all versions before)

I tested on windows, 32 bit vista, but was told the issue was also present on linux (not tested myself).

Compile the program below using fpc (freepascal). The issue occurs with stabs (fpc -gs) or dwarf2 (fpc -gw).

Set a breakpoint on "writeln" and run.

Try to evaluate:
 ptype member1

This should return (and does with older gdb)
 type = integer

With gdb 7.7 or 7.8 it returns:
 Type TFOO has no component named member1.\n

It seems to be a case sensitivity issue:
this works:  ptype MEMBER1

But
 ptype self.member1
also works, being lowercase.



program classmember;
type
  TFoo = class
    member1: integer;
    procedure bar;
  end;

procedure TFoo.bar;
begin
  member1 := 222;
  writeln;
end;

begin
  TFoo.Create.bar;
end.
Comment 1 Martin 2015-08-31 10:20:09 UTC
Issue is fixed in 7.9.1 

possible due to changes from #17815 ?