[Bug binutils/11512] addr2line displays frong filename for GCC app compiled with -gcoff option

2010-04-21 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2010-04-21 07:02 
---
Hi dzidzitop,

  Oops - sorry about that.  I uploaded the wrong patch file by mistake.  Please
try out the new one instead.  With this patch applied, using your test case I 
get:

  % addr2line -e bbb.exe 0x4013c0
  bbb.cpp:4

Cheers
  Nick


-- 
   What|Removed |Added

 Status|NEW |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=11512

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gprof/11524] New: segmentation fault when use --external-symbol-table option

2010-04-21 Thread hongsheng611 at gmail dot com
the bug is in the file: binutils-2.20/gprof/corefile.c 

in the function:  static int num_of_syms_in (FILE * f)

line 520:   while (!feof (f)  fgets (buf, sizeof (buf), f))

this is wrong! because the type of buf is char *, so sizeof(buf)=4 

this would cause segmentation fault when use --external-symbol-table option.

it should be changed to :   while (!feof (f)  fgets (buf, BUFSIZE - 1, f))

-- 
   Summary: segmentation fault when use --external-symbol-table
option
   Product: binutils
   Version: 2.20
Status: NEW
  Severity: normal
  Priority: P2
 Component: gprof
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: hongsheng611 at gmail dot com
CC: bug-binutils at gnu dot org
GCC target triplet: x86-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=11524

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11512] addr2line displays frong filename for GCC app compiled with -gcoff option

2010-04-21 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2010-04-21 07:01 
---
Created an attachment (id=4744)
 -- (http://sourceware.org/bugzilla/attachment.cgi?id=4744action=view)
Correct patch: Adds section address to filename symbols' values


-- 
   What|Removed |Added

Attachment #4740 is|0   |1
   obsolete||


http://sourceware.org/bugzilla/show_bug.cgi?id=11512

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11512] addr2line displays frong filename for GCC app compiled with -gcoff option

2010-04-21 Thread dzidzitop at lavabit dot com

--- Additional Comments From dzidzitop at lavabit dot com  2010-04-21 12:36 
---
Good job Nick. This works for me, at least under Ubuntu. Thanks.

-- 
   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=11512

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11512] addr2line displays frong filename for GCC app compiled with -gcoff option

2010-04-21 Thread dzidzitop at lavabit dot com

--- Additional Comments From dzidzitop at lavabit dot com  2010-04-21 12:46 
---
By the way
!  offset + sec_vma = file_addr
!  offset + sec_vma - file_addr = maxdiff)

This code from your patch. It could be re-written to store offset + sec_vma -
file_addr into a variable, say x, and then check for x = 0  x = maxdiff.

It is unsufficient, but anyway :)

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11512

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/11509] Strange evaluation of symbol containing register

2010-04-21 Thread hjl dot tools at gmail dot com

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2010-04-21 
18:10 ---
Subject: Bug 11509

CVSROOT:/cvs/src
Module name:src
Changes by: h...@sourceware.org 2010-04-21 18:09:53

Modified files:
gas: ChangeLog read.c 
gas/config : tc-i386-intel.c tc-i386.c 
gas/testsuite  : ChangeLog 
gas/testsuite/gas/i386: equ.d equ.s 

Log message:
Properly handle .equ symbol, reg + NUM in x86 Intel syntax.

gas/

2010-04-21  H.J. Lu  hongjiu...@intel.com

PR gas/11509
* config/tc-i386-intel.c (i386_intel_simplify_register): New.
(i386_intel_simplify): Use i386_is_register and
i386_intel_simplify_register. Set X_md for O_register and
check X_md for O_constant.
(i386_intel_operand): Use i386_is_register.

* config/tc-i386.c (i386_is_register): New.
(x86_cons): Initialize the X_md field.  Use i386_is_register.
(parse_register): Use i386_is_register.
(tc_x86_parse_to_dw2regnum): Likewise.

gas/testsuite/

2010-04-21  H.J. Lu  hongjiu...@intel.com

PR gas/11509
* gas/i386/equ.s: Add tests for .equ symbol, reg + NUM.
* gas/i386/equ.d: Updated.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=srcr1=1.4136r2=1.4137
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/read.c.diff?cvsroot=srcr1=1.162r2=1.163
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386-intel.c.diff?cvsroot=srcr1=1.9r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.c.diff?cvsroot=srcr1=1.431r2=1.432
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=srcr1=1.1657r2=1.1658
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/i386/equ.d.diff?cvsroot=srcr1=1.3r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/i386/equ.s.diff?cvsroot=srcr1=1.4r2=1.5


--- Additional Comments From hjl dot tools at gmail dot com  2010-04-21 
18:26 ---
Fixed.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11509

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils