From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4801 invoked by alias); 5 Feb 2013 19:17:28 -0000 Received: (qmail 4777 invoked by uid 48); 5 Feb 2013 19:17:26 -0000 From: "gdb.bugs at mfriebe dot de" To: gdb-prs@sourceware.org Subject: [Bug gdb/15102] New: dwarf/regression: array index treated as signed byte, when specified unsigned byte (leads to [0..-n]) Date: Tue, 05 Feb 2013 19:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gdb.bugs at mfriebe dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00192.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15102 Bug #: 15102 Summary: dwarf/regression: array index treated as signed byte, when specified unsigned byte (leads to [0..-n]) Product: gdb Version: 7.5 Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: gdb.bugs@mfriebe.de Classification: Unclassified This issue is present in GDB 7.3, gdb 7.4, gdb 7.5 It was not present in 7.2 Compile using free-pascal (-gw creates dwarf 2) fpc.exe -gw Array.pas program Foo; type TByteArray = array[0..191] of integer; var a: TByteArray; begin a[1] := 0; end. execute in gdb: ptype TByteArray type = array [0..-65] of SMALLINT But it should be 0..191 OBJDUMP -w shows <2><95>: Abbrev Number: 6 (DW_TAG_subrange_type) <96> DW_AT_lower_bound : 0 <97> DW_AT_upper_bound : 191 <99> DW_AT_stride : 2 <9a> DW_AT_type : <0xc3> <1>: Abbrev Number: 4 (DW_TAG_typedef) DW_AT_name : BYTE DW_AT_type : <0xcd> <1>: Abbrev Number: 8 (DW_TAG_base_type) DW_AT_name : BYTE DW_AT_encoding : 7 (unsigned) DW_AT_byte_size : 1 The basetype is clearly marked unsigned. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.