[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/9735] New: wrong source file shown by objdump -S
From: |
dick at streefland dot net |
Subject: |
[Bug binutils/9735] New: wrong source file shown by objdump -S |
Date: |
12 Jan 2009 16:59:14 -0000 |
When disassembling an application consisting of multiple modules with objdump
-S, all source code lines are read from the first source file. This problem is
caused by two missing xstrdup() calls try_print_file_open() in the file
objdump.c. It is fixed by the following patch:
diff -pu binutils-2.18.1~cvs20080103/binutils/objdump.c.orig
binutils-2.18.1~cvs20080103/binutils/objdump.c
--- binutils-2.18.1~cvs20080103/binutils/objdump.c.orig 2008-01-03
23:44:13.000000000 +0100
+++ binutils-2.18.1~cvs20080103/binutils/objdump.c 2009-01-12
16:02:21.000000000
+0100
@@ -1062,8 +1062,8 @@ try_print_file_open (const char *orignam
p->linemap = index_file (p->map, p->mapsize, &p->maxline);
p->last_line = 0;
- p->filename = origname;
- p->modname = modname;
+ p->filename = xstrdup(origname);
+ p->modname = xstrdup(modname);
p->next = print_files;
p->first = 1;
print_files = p;
--
Summary: wrong source file shown by objdump -S
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: dick at streefland dot net
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=9735
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/9735] New: wrong source file shown by objdump -S,
dick at streefland dot net <=
- [Bug binutils/9735] wrong source file shown by objdump -S, amodra at bigpond dot net dot au, 2009/01/12
- [Bug binutils/9735] wrong source file shown by objdump -S, amodra at bigpond dot net dot au, 2009/01/12
- [Bug binutils/9735] wrong source file shown by objdump -S, amodra at bigpond dot net dot au, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, dick at streefland dot net, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, dick at streefland dot net, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, amodra at bigpond dot net dot au, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, dick at streefland dot net, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, cvs-commit at gcc dot gnu dot org, 2009/01/13
- [Bug binutils/9735] wrong source file shown by objdump -S, amodra at bigpond dot net dot au, 2009/01/13