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.
+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
2018-09-08 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_exception_sal): Replace gdb_assert calls
static char *decoding_buffer = NULL;
static size_t decoding_buffer_size = 0;
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. */
/* 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. */