aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-01-20 03:34:25 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-01-20 03:34:25 +0000
commit692465f151fa76f678ca0b2469cd4aec199bcb75 (patch)
tree0f84f248637104fe3bfcdf1942647755175c183a /gdb
parent95519e0ee9887b575e2ea52ed9599ff90b41aebd (diff)
downloadgdb-692465f151fa76f678ca0b2469cd4aec199bcb75.zip
gdb-692465f151fa76f678ca0b2469cd4aec199bcb75.tar.gz
gdb-692465f151fa76f678ca0b2469cd4aec199bcb75.tar.bz2
Get rid of ada-lang.c:function_name_from_pc.
* ada-lang.c: Add "stack.h" #include. (function_name_from_pc): Delete. (is_known_support_routine): Replace call to function_name_from_pc by call to find_frame_funname. (ada_unhandled_exception_name_addr_from_raise): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/ada-lang.c25
2 files changed, 16 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2e52f74..d188290 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-20 Joel Brobecker <brobecker@adacore.com>
+
+ Get rid of ada-lang.c:function_name_from_pc.
+ * ada-lang.c: Add "stack.h" #include.
+ (function_name_from_pc): Delete.
+ (is_known_support_routine): Replace call to function_name_from_pc
+ by call to find_frame_funname.
+ (ada_unhandled_exception_name_addr_from_raise): Likewise.
+
2010-01-19 Tom Tromey <tromey@redhat.com>
PR c++/11026:
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f00c06f..40b70ab 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -56,6 +56,7 @@
#include "source.h"
#include "observer.h"
#include "vec.h"
+#include "stack.h"
/* Define whether or not the C operator '/' truncates towards zero for
differently signed operands (truncation direction is undefined in C).
@@ -10150,21 +10151,6 @@ ada_executable_changed_observer (void)
exception_info = NULL;
}
-/* Return the name of the function at PC, NULL if could not find it.
- This function only checks the debugging information, not the symbol
- table. */
-
-static char *
-function_name_from_pc (CORE_ADDR pc)
-{
- char *func_name;
-
- if (!find_pc_partial_function (pc, &func_name, NULL, NULL))
- return NULL;
-
- return func_name;
-}
-
/* True iff FRAME is very likely to be that of a function that is
part of the runtime system. This is all very heuristic, but is
intended to be used as advice as to what frames are uninteresting
@@ -10175,6 +10161,7 @@ is_known_support_routine (struct frame_info *frame)
{
struct symtab_and_line sal;
char *func_name;
+ enum language func_lang;
int i;
/* If this code does not have any debugging information (no symtab),
@@ -10210,7 +10197,7 @@ is_known_support_routine (struct frame_info *frame)
/* Check whether the function is a GNAT-generated entity. */
- func_name = function_name_from_pc (get_frame_address_in_block (frame));
+ find_frame_funname (frame, &func_name, &func_lang);
if (func_name == NULL)
return 1;
@@ -10275,8 +10262,10 @@ ada_unhandled_exception_name_addr_from_raise (void)
while (fi != NULL)
{
- const char *func_name =
- function_name_from_pc (get_frame_address_in_block (fi));
+ char *func_name;
+ enum language func_lang;
+
+ find_frame_funname (fi, &func_name, &func_lang);
if (func_name != NULL
&& strcmp (func_name, exception_info->catch_exception_sym) == 0)
break; /* We found the frame we were looking for... */