summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch')
-rw-r--r--recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch b/recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch
new file mode 100644
index 00000000..3912ca57
--- /dev/null
+++ b/recipes-devtools/gdb/files/0010-Patch-gdb-Robustify-inline-function-support.patch
@@ -0,0 +1,43 @@
1From a02963a97d7ce38b0af205f9e3e6dd7e0e06d9be Mon Sep 17 00:00:00 2001
2From: "Edgar E. Iglesias" <edgar@axis.com>
3Date: Mon, 27 Feb 2012 06:28:00 +0100
4Subject: [PATCH 10/16] [Patch, gdb]: Robustify inline function support
5
6Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
7Upstream-Status: Pending
8---
9 gdb/blockframe.c | 3 ++-
10 gdb/inline-frame.c | 3 +++
11 2 files changed, 5 insertions(+), 1 deletion(-)
12
13diff --git a/gdb/blockframe.c b/gdb/blockframe.c
14index 0a9381e..ba41d85 100644
15--- a/gdb/blockframe.c
16+++ b/gdb/blockframe.c
17@@ -77,7 +77,8 @@ get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block)
18 inline_count--;
19
20 bl = BLOCK_SUPERBLOCK (bl);
21- gdb_assert (bl != NULL);
22+ if (!bl)
23+ return NULL;
24 }
25
26 return bl;
27diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
28index eb82143..a793390 100644
29--- a/gdb/inline-frame.c
30+++ b/gdb/inline-frame.c
31@@ -231,6 +231,9 @@ inline_frame_sniffer (const struct frame_unwind *self,
32 cur_block = BLOCK_SUPERBLOCK (cur_block);
33 }
34
35+ if (depth == 0)
36+ return 0;
37+
38 /* Check how many inlined functions already have frames. */
39 for (next_frame = get_next_frame (this_frame);
40 next_frame && get_frame_type (next_frame) == INLINE_FRAME;
41--
421.9.0
43