This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/Ada] Add handling of new non-anonymous task body suffix

The GNAT encoding got changed recently to add this suffix, in order
to avoid the confusion between anonymous task bodies vs task bodies
for non-anonymous tasks.  This was done not for GDB, but for another
tool that uses that information to do some code inspection. Anonymous
task bodies still have a TKB suffix, so we still need to support that.

This patch just adds support for "TB" suffixes.

Tested on x86_64-linux. Checked in.

    * ada-lang.c (ada_decode): Add handling of "TB" suffixes for
    task bodies.
 gdb/ada-lang.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 3c9ab77..5dc4ca1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -949,6 +949,13 @@ ada_decode (const char *encoded)
   if (len0 > 3 && strncmp (encoded + len0 - 3, "TKB", 3) == 0)
     len0 -= 3;
+  /* Remove any trailing TB suffix.  The TB suffix is slightly different
+     from the TKB suffix because it is used for non-anonymous task
+     bodies.  */
+  if (len0 > 2 && strncmp (encoded + len0 - 2, "TB", 2) == 0)
+    len0 -= 2;
   /* Remove trailing "B" suffixes.  */
   /* FIXME: brobecker/2006-04-19: Not sure what this are used for...  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]