logo       

Re: pascal/1477: gdb can not read DWARF-2 debug info about set types: msg#00038

Subject: Re: pascal/1477: gdb can not read DWARF-2 debug info about set types
The following reply was made to PR pascal/1477; it has been noted by GNATS.

From: Waldek Hebisch <hebisch@xxxxxxxxxxxxxxxx>
To: muller@xxxxxxxxxxxxxxxx, gdb-prs@xxxxxxxxxxxxxxxxxx, 
 hebisch@xxxxxxxxxxxxxxxx, nobody@xxxxxxxxxxxxxxxxxx, 
 gdb-gnats@xxxxxxxxxxxxxxxxxx
Cc:  
Subject: Re: pascal/1477: gdb can not read DWARF-2 debug info about set types
Date: Tue, 20 Feb 2007 22:57:15 +0100 (CET)

 > Synopsis: gdb can not read DWARF-2 debug info about set types
 > 
 > Responsible-Changed-From-To: unassigned->muller
 > Responsible-Changed-By: muller
 > Responsible-Changed-When: Mon Feb  5 16:48:53 2007
 > Responsible-Changed-Why:
 >     Pascal specific
 > State-Changed-From-To: open->feedback
 > State-Changed-By: muller
 > State-Changed-When: Mon Feb  5 16:48:53 2007
 > State-Changed-Why:
 >       Could you please test gdb 6.6, I think that
 >     this issue should be solved due to an ADA patch.
 >     ADA language apparently also has sets.
 > 
 > http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1477
 > 
 
 The testcase included in the report works now.  However, there are still
 problems:
 - gdb does not recognize the program as a Pascal program (I have to
 use 'set language pascal', otherwise I get:
 
 hebisch@iduo2:~$ gcc/gdb-build/gdb/gdb ./a.out
 GNU gdb 6.6
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "x86_64-unknown-linux-gnu"...
 Using host libthread_db library "/lib/libthread_db.so.1".
 (gdb) break _p__M0_main_program
 Breakpoint 1 at 0x4029fc: file set1.pas, line 5.
 (gdb) run
 Starting program: /var/tmp/hebisch/a.out
 
 Breakpoint 1, main program () at set1.pas:6
 6       begin
 Current language:  auto; currently minimal
 (gdb) s
 7          dummy := [bar];
 (gdb) print dummy
 $1 = <error reading variable>
 (gdb) s
 Hello
 10      .
 (gdb) print dummy
 $2 = <error reading variable>
 (gdb)
 
 Also, a slightly more complicated program causes troubles:
 
 
 var
   foo: set of 1 .. 42 = [4 .. 27];
   i: Integer;
 
 begin
   i := 15;
   Exclude (foo, i);
   i := 3;
   Include (foo, i);
   if foo = [3 .. 14, 16 .. 27] then
     WriteLn ('OK')
   else
     WriteLn ('failed')
 end.
 
 gpc -g sets14b.pas
 sets14b.pas:1: warning: missing program header
 hebisch@iduo2:~$ gcc/gdb-build/gdb/gdb ./a.out
 GNU gdb 6.6
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "x86_64-unknown-linux-gnu"...
 Using host libthread_db library "/lib/libthread_db.so.1".
 (gdb) break _p__M0_main_program
 Breakpoint 1 at 0x4029fc: file sets14b.pas, line 4.
 (gdb) run
 Starting program: /var/tmp/hebisch/a.out
 
 Breakpoint 1, 0x00000000004029fc in main program () at sets14b.pas:4
 4         i: Integer;
 Current language:  auto; currently minimal
 (gdb) print foo
 Cannot access memory at address 0x533778
 (gdb) set language pascal
 Warning: the current language does not match this frame.
 (gdb) print foo
 Cannot access memory at address 0x533778
 (gdb) set language c
 (gdb) print *(long *)0x533778
 $1 = 268435440
 (gdb)
 
 AFAIK Modula-2 has sets and what works now is probably due to Modula-2
 patches.  However, it seems that Modula-2 handles some aspects quite
 different than Pascal.
 
 -- 
                               Waldek Hebisch
 hebisch@xxxxxxxxxxxxxxxx 



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe