diff options
author | Jerome Guitton <guitton@adacore.com> | 2018-09-08 16:47:11 -0500 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2018-09-08 17:47:11 -0400 |
commit | 0d81f350ec01630ef7cd9ae4385a1dc504c54d73 (patch) | |
tree | 07f8f7bbae941baebf95ec3c0924a28366d36ea3 /gdb | |
parent | 57aff202b4b17a05d73e71680a26fe12a817f110 (diff) | |
download | gdb-0d81f350ec01630ef7cd9ae4385a1dc504c54d73.zip gdb-0d81f350ec01630ef7cd9ae4385a1dc504c54d73.tar.gz gdb-0d81f350ec01630ef7cd9ae4385a1dc504c54d73.tar.bz2 |
Handle PPC64 function descriptor in Ada decoding
On PPC64, the entry point of the function "FN" is ".FN" when a function
descriptor is used. One of the consequences of this is that GDB then
presents the name of the function to the user (eg: in backtraces) with
the leading dot, which is a low-level internal detail that the user
should not be seeing. The Ada decoding should strip it.
gdb/ChangeLog:
* ada-lang.c (ada_decode): strip dot prefix in symbol name.
No testcase added, as a number of existing testcases should already
demonstrate that problem.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/ada-lang.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4aeb0ba..41b1ad4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-09-08 Jerome Guitton <guitton@adacore.com> + + * ada-lang.c (ada_decode): strip dot prefix in symbol name. + 2018-09-08 Joel Brobecker <brobecker@adacore.com> * ada-lang.c (ada_exception_sal): Replace gdb_assert calls diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c5cddd0..16c7c51 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1164,6 +1164,11 @@ ada_decode (const char *encoded) static char *decoding_buffer = NULL; static size_t decoding_buffer_size = 0; + /* With function descriptors on PPC64, the value of a symbol named + ".FN", if it exists, is the entry point of the function "FN". */ + if (encoded[0] == '.') + encoded += 1; + /* The name of the Ada main procedure starts with "_ada_". This prefix is not part of the decoded name, so skip this part if we see this prefix. */ |