mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-19 19:43:34 -04:00
addr2line: Always parse addresses as hex numbers.
We would sometimes interpret input addresses as decimal or octal. That could be confusing and isn't what binutils addr2line does. Be consistent and always treat input addresses as hex. Signed-off-by: Mark Wielaard <mjw@redhat.com>
This commit is contained in:
@@ -2,6 +2,9 @@ Version 0.162
|
||||
|
||||
libdw: Install new header elfutils/known-dwarf.h.
|
||||
|
||||
addr2line: Input addresses are now always interpreted as hexadecimal
|
||||
numbers, never as octal or decimal numbers.
|
||||
|
||||
Version 0.161
|
||||
|
||||
libdw: New function dwarf_peel_type. dwarf_aggregate_size now uses
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2015-05-20 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* addr2line.c (handle_address): Call strtoumax with base 16. Make
|
||||
sure all input has been processed.
|
||||
|
||||
2015-05-20 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* addr2line (argp_option): Group 'section' under "Input format
|
||||
|
||||
+2
-2
@@ -532,8 +532,8 @@ static int
|
||||
handle_address (const char *string, Dwfl *dwfl)
|
||||
{
|
||||
char *endp;
|
||||
uintmax_t addr = strtoumax (string, &endp, 0);
|
||||
if (endp == string)
|
||||
uintmax_t addr = strtoumax (string, &endp, 16);
|
||||
if (endp == string || *endp != '\0')
|
||||
{
|
||||
bool parsed = false;
|
||||
int i, j;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2015-05-20 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* run-addrname-test.sh: Make sure all input addresses are hex.
|
||||
|
||||
2015-05-04 Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
* backtrace-child.c (stdarg, main): Replace assert_perror with assert.
|
||||
|
||||
@@ -277,7 +277,7 @@ EOF
|
||||
# local l0local2, 0
|
||||
# offset 12
|
||||
testfiles testfile64
|
||||
testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF
|
||||
testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 c <<\EOF
|
||||
gglobal2
|
||||
??:0
|
||||
g0global2
|
||||
|
||||
Reference in New Issue
Block a user