public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug pascal/7327] GDB scope does not work quite right for Pascal
       [not found] <bug-7327-4717@http.sourceware.org/bugzilla/>
@ 2014-09-16 20:25 ` sergiodj at redhat dot com
  2014-09-17  8:17 ` muller at ics dot u-strasbg.fr
  2014-09-17 15:26 ` sergiodj at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: sergiodj at redhat dot com @ 2014-09-16 20:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=7327

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING
                 CC|                            |sergiodj at redhat dot com

--- Comment #2 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
The attachment got lost during the conversion process, probably.  Pierre, I
know it has been a long time, but do you remember anything about this bug?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug pascal/7327] GDB scope does not work quite right for Pascal
       [not found] <bug-7327-4717@http.sourceware.org/bugzilla/>
  2014-09-16 20:25 ` [Bug pascal/7327] GDB scope does not work quite right for Pascal sergiodj at redhat dot com
@ 2014-09-17  8:17 ` muller at ics dot u-strasbg.fr
  2014-09-17 15:26 ` sergiodj at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: muller at ics dot u-strasbg.fr @ 2014-09-17  8:17 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=7327

--- Comment #3 from Pierre Muller <muller at ics dot u-strasbg.fr> ---
 Yes, I do.

  In fact, if you have a code like this:


procedure Global;

var
   x, y : integer;

  procedure local;

  var
    z,t : longint;

  begin
     z:=x;
     t:=y;
  end;

begin
  x:=8;
  y:=11;
  local;
end;

fpc -g bugzilla-7327.pas

E:\pas\gdb>gdb-7.8 bugzilla-7327.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bugzilla-7327.exe...done.
(gdb) b LOCAL
Breakpoint 1 at 0x40144a: file bugzilla-7327.pas, line 12.
(gdb) r
Starting program: E:\pas\gdb\bugzilla-7327.exe
[New Thread 5604.0x1ae0]
[New Thread 5604.0x1820]

Breakpoint 1, LOCAL (parentfp=0x14cff58) at bugzilla-7327.pas:12
12           z:=x;
(gdb) p X
No symbol "X" in current context.
(gdb) f 1
#1  0x0040143a in GLOBAL () at bugzilla-7327.pas:19
19        local;
(gdb) p X
$1 = 8

Inside the IDE developped for Free Pascal,
this problem is solved by using the "hidden variable" parentfp
which points to the frame of the calling Global function.

  I don't know if any language supports this correctly 
directly inside GDB itself.
  Note that I am not sure that the parentfp trick is really
implemented and working for all CPUs supported by Free Pascal
compiler. 
  I have also no idea about the status of this problem with GPC compiler.

begin
  Global;
end.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug pascal/7327] GDB scope does not work quite right for Pascal
       [not found] <bug-7327-4717@http.sourceware.org/bugzilla/>
  2014-09-16 20:25 ` [Bug pascal/7327] GDB scope does not work quite right for Pascal sergiodj at redhat dot com
  2014-09-17  8:17 ` muller at ics dot u-strasbg.fr
@ 2014-09-17 15:26 ` sergiodj at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: sergiodj at redhat dot com @ 2014-09-17 15:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=7327

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #4 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Hm, OK.  So the bug is not fixed yet, as I understand.  I am marking it as NEW.

Thanks, Pierre!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-09-17 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-7327-4717@http.sourceware.org/bugzilla/>
2014-09-16 20:25 ` [Bug pascal/7327] GDB scope does not work quite right for Pascal sergiodj at redhat dot com
2014-09-17  8:17 ` muller at ics dot u-strasbg.fr
2014-09-17 15:26 ` sergiodj at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).