public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-jankratochvil-entryval: +NOT_FOUND_ERROR
@ 2011-07-16 9:49 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-07-16 9:49 UTC (permalink / raw)
To: archer-commits
The branch, archer-jankratochvil-entryval has been updated
via 0422f3a989cfe0e53e3b047fb6180c9e174f7591 (commit)
via 7964d12e4c47d34caa1456bcb06cc1e93188d9c3 (commit)
via 2b8ebfa6726465007e36dcefbb1ce469d29abcbe (commit)
via 6bc429d736860180be5ade0bdccab24bad8b9b84 (commit)
via b31425cc4e488eb2745ed52bc2a1cce8adf26ea8 (commit)
via c10a5a0fc1128b880bbb37239736de77cc5f336a (commit)
via e1e7ec8a14321b527d201a25e64a7d881d88f5cf (commit)
via 6b9950e8b674663f7df2d5eab1bb120c73aa3e73 (commit)
via a21bd7c646153cda32ef219e5d9030973477d354 (commit)
via 74396bb141a690535e6a94106c43c67f70ea306b (commit)
via 5cc0606ea056e5fe401acee131c84cc234d21205 (commit)
via fd3c984e15059d2699bb266d194a2fc66c350b0a (commit)
via 720d8e346548f7e99d705fd7a3368d63e55e3521 (commit)
via cdaa481e3b8eef6b74883176f499a563f9b4e62b (commit)
via 3f19c54200960d55b8336fe1e4c43ae630308b35 (commit)
via 08dd4fc2574e0c85f1ca486631444bf50f06bf60 (commit)
via 1268bfd6755f2435b3ee5db10f609f5104f18736 (commit)
via 7fc8d70e9f6c399e6b7b851afc78c8b051367b9b (commit)
via e362f095b02462f383dc53b21d87f13812539705 (commit)
via f7b3325e58821deb377460a44f857f07e075f279 (commit)
via 3c4a91b873387673660639833d96bfa5a1616889 (commit)
via d63a541607869191cb9b4275770017bdf34eece6 (commit)
via 0667f5e3d73d6d84bc36c92b3dff4cc173bdb3d7 (commit)
via 0f2bd1cfe3c10d7249ca64a51d7c59eed08bed21 (commit)
via f66fa3127ab91a8d1a6784ef3d072bef87ca2758 (commit)
via 84a22f1c2284d33fa91aff1bc240c13d039708b5 (commit)
via b7813c9ca3110fd6a5e0b6a6b8965ff0cdd29da5 (commit)
via 4c7042be03e259c907be368302fca9f15f5b1b44 (commit)
via eab39d675aa9597d48724b91cc55828f7dc08f14 (commit)
via 2877c7ce99a8b94c6eebad70a6f5fa4852c2727e (commit)
via 326f58e9915854ed59572cbd5795bd79c36ec77c (commit)
via 8599d0975d5a5b374bac0739ed620154e4df2882 (commit)
via 523535388342fc51e94f0db5c1fe975a55de95a7 (commit)
from a402d7e45e916a264d49335834646a24d0c922c6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 0422f3a989cfe0e53e3b047fb6180c9e174f7591
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:48:33 2011 +0200
+NOT_FOUND_ERROR
commit 7964d12e4c47d34caa1456bcb06cc1e93188d9c3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:38:43 2011 +0200
q
commit 2b8ebfa6726465007e36dcefbb1ce469d29abcbe
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:37:20 2011 +0200
+cmt
commit 6bc429d736860180be5ade0bdccab24bad8b9b84
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:19:01 2011 +0200
micro opt
commit b31425cc4e488eb2745ed52bc2a1cce8adf26ea8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:16:38 2011 +0200
foo
commit c10a5a0fc1128b880bbb37239736de77cc5f336a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:14:46 2011 +0200
wording
commit e1e7ec8a14321b527d201a25e64a7d881d88f5cf
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:12:55 2011 +0200
micro cleanup
commit 6b9950e8b674663f7df2d5eab1bb120c73aa3e73
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 11:07:22 2011 +0200
make it CORE_ADDR -> call_site based
commit a21bd7c646153cda32ef219e5d9030973477d354
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 10:45:40 2011 +0200
! ->!
commit 74396bb141a690535e6a94106c43c67f70ea306b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 10:39:23 2011 +0200
micro opt
commit 5cc0606ea056e5fe401acee131c84cc234d21205
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 10:37:21 2011 +0200
+cmt
commit fd3c984e15059d2699bb266d194a2fc66c350b0a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 10:31:26 2011 +0200
name fix
commit 720d8e346548f7e99d705fd7a3368d63e55e3521
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 09:54:42 2011 +0200
undo pending as unrelated
commit cdaa481e3b8eef6b74883176f499a563f9b4e62b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 09:48:15 2011 +0200
+cmt
commit 3f19c54200960d55b8336fe1e4c43ae630308b35
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 09:45:00 2011 +0200
fmt
commit 08dd4fc2574e0c85f1ca486631444bf50f06bf60
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 09:33:35 2011 +0200
remove redundant tail_call_list_complete
commit 1268bfd6755f2435b3ee5db10f609f5104f18736
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 08:41:44 2011 +0200
technical simplifications
commit 7fc8d70e9f6c399e6b7b851afc78c8b051367b9b
Merge: f7b3325 e362f09
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 07:44:08 2011 +0200
Merge branch 'pending' into archer-jankratochvil-entryval
commit e362f095b02462f383dc53b21d87f13812539705
Merge: 127a24b 3c4a91b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 07:43:57 2011 +0200
Merge remote-tracking branch 'gdb/master' into pending
commit f7b3325e58821deb377460a44f857f07e075f279
Merge: 0667f5e 3c4a91b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Jul 16 07:30:07 2011 +0200
Merge remote-tracking branch 'gdb/master' into archer-jankratochvil-entryval
commit 3c4a91b873387673660639833d96bfa5a1616889
Author: Alan Modra <amodra@bigpond.net.au>
Date: Sat Jul 16 00:00:05 2011 +0000
daily update
commit d63a541607869191cb9b4275770017bdf34eece6
Author: gdbadmin <gdbadmin@sourceware.org>
Date: Sat Jul 16 00:00:02 2011 +0000
*** empty log message ***
commit 0667f5e3d73d6d84bc36c92b3dff4cc173bdb3d7
Merge: a402d7e 0f2bd1c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri Jul 15 23:35:06 2011 +0200
Merge remote-tracking branch 'gdb/master' into archer-jankratochvil-entryval
Conflicts:
gdb/dwarf2-frame.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
commit 0f2bd1cfe3c10d7249ca64a51d7c59eed08bed21
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri Jul 15 20:54:30 2011 +0000
gdb/
Code cleanup.
* dwarf2-frame.c (dwarf2_frame_ctx_funcs): New.
(execute_stack_op): Use dwarf2_frame_ctx_funcs
* dwarf2expr.c (dwarf_get_base_type): Access get_base_type via funcs.
(execute_stack_op): Access read_reg, get_frame_base, read_mem,
get_frame_cfa, get_tls_address and dwarf_call via funcs.
* dwarf2expr.h (struct dwarf_expr_context): New forward declaration.
(struct dwarf_expr_context_funcs): New, move here methods from ...
(struct dwarf_expr_context): ... here. New fields funcs.
* dwarf2loc.c (dwarf_expr_dwarf_call): Access get_frame_pc via funcs.
(dwarf_expr_ctx_funcs): New.
(dwarf2_evaluate_loc_desc_full): Use dwarf_expr_ctx_funcs.
(needs_frame_dwarf_call): Access get_frame_pc via funcs.
(needs_frame_ctx_funcs): New.
(dwarf2_loc_desc_needs_frame): Use needs_frame_ctx_funcs.
commit f66fa3127ab91a8d1a6784ef3d072bef87ca2758
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri Jul 15 18:46:10 2011 +0000
gdb/testsuite/
Code cleanup.
* gdb.cp/namespace.exp (xfail_class_types): New variable. Initialize
it. Substitute it instead of test_compiler_info everywhere.
-----------------------------------------------------------------------
Summary of changes:
bfd/ChangeLog | 5 +
bfd/configure | 2 +-
bfd/configure.in | 2 +-
bfd/version.h | 2 +-
gdb/ChangeLog | 31 +++
gdb/MAINTAINERS | 1 +
gdb/block.c | 4 +-
gdb/dwarf2-frame-tailcall.c | 5 +-
gdb/dwarf2-frame.c | 130 ++++++++++---
gdb/dwarf2expr.c | 36 ++--
gdb/dwarf2expr.h | 102 +++++-----
gdb/dwarf2loc.c | 322 +++++++++++++++--------------
gdb/dwarf2loc.h | 8 +-
gdb/dwarf2read.c | 99 ++++------
gdb/gdb-gdb.py | 8 +-
gdb/gdbtypes.c | 2 -
gdb/gdbtypes.h | 12 +-
gdb/remote.c | 1 +
gdb/testsuite/ChangeLog | 22 ++
gdb/testsuite/gdb.base/type-opaque.exp | 7 +-
gdb/testsuite/gdb.cp/namespace.exp | 34 +--
gdb/testsuite/gdb.dwarf2/dw2-op-call.S | 32 ---
gdb/testsuite/gdb.dwarf2/dw2-op-call.exp | 15 +-
gdb/testsuite/gdb.dwarf2/implptr.exp | 3 -
gdb/testsuite/gdb.threads/tls-shared.exp | 46 +----
gdb/testsuite/lib/gdb.exp | 49 +++++-
gdb/version.in | 2 +-
include/ChangeLog | 12 +-
include/bfdlink.h | 188 +++++++++---------
29 files changed, 639 insertions(+), 543 deletions(-)
First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cec63cd..2540c65 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-15 Alan Modra <amodra@gmail.com>
+
+ * configure.in: Bump version.
+ * configure: Regenerate.
+
2011-07-14 Alan Modra <amodra@gmail.com>
* linker.c (_bfd_generic_section_already_linked): Set l_flags.
diff --git a/bfd/configure b/bfd/configure
index 32e9c98..36103a6 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -3988,7 +3988,7 @@ fi
# Define the identity of the package.
PACKAGE=bfd
- VERSION=2.21.52
+ VERSION=2.21.53
cat >>confdefs.h <<_ACEOF
diff --git a/bfd/configure.in b/bfd/configure.in
index 3dfa34e..d966e31 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.21.52)
+AM_INIT_AUTOMAKE(bfd, 2.21.53)
dnl These must be called before LT_INIT, because it may want
dnl to call AC_CHECK_PROG.
diff --git a/bfd/version.h b/bfd/version.h
index 30138e0..4e2d3ef 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20110714
+#define BFD_VERSION_DATE 20110716
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f0cc501..b5bb858 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,34 @@
+2011-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * dwarf2-frame.c (dwarf2_frame_ctx_funcs): New.
+ (execute_stack_op): Use dwarf2_frame_ctx_funcs
+ * dwarf2expr.c (dwarf_get_base_type): Access get_base_type via funcs.
+ (execute_stack_op): Access read_reg, get_frame_base, read_mem,
+ get_frame_cfa, get_tls_address and dwarf_call via funcs.
+ * dwarf2expr.h (struct dwarf_expr_context): New forward declaration.
+ (struct dwarf_expr_context_funcs): New, move here methods from ...
+ (struct dwarf_expr_context): ... here. New fields funcs.
+ * dwarf2loc.c (dwarf_expr_dwarf_call): Access get_frame_pc via funcs.
+ (dwarf_expr_ctx_funcs): New.
+ (dwarf2_evaluate_loc_desc_full): Use dwarf_expr_ctx_funcs.
+ (needs_frame_dwarf_call): Access get_frame_pc via funcs.
+ (needs_frame_ctx_funcs): New.
+ (dwarf2_loc_desc_needs_frame): Use needs_frame_ctx_funcs.
+
+2011-07-15 Fawzi Mohamed <fawzi.mohamed@nokia.com>
+
+ * MAINTAINERS (Write After Approval): Add myself to the list.
+
+2011-07-15 Fawzi Mohamed <fawzi.mohamed@nokia.com>
+
+ * dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): Ensure
+ that CIE pointer of an FDE really points to a CIE .
+
+2011-07-15 Hui Zhu <teawater@gmail.com>
+
+ * remote.c (remote_get_trace_status): Add comments.
+
2011-07-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup - constify struct lval_funcs.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 7e353ef..c85ad4e 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -559,6 +559,7 @@ David S. Miller davem@redhat.com
Mark Mitchell mark@codesourcery.com
Marko Mlinar markom@opencores.org
Alan Modra amodra@gmail.com
+Fawzi Mohamed fawzi.mohamed@nokia.com
Jason Molenda jmolenda@apple.com
Chris Moller cmoller@redhat.com
Phil Muldoon pmuldoon@redhat.com
diff --git a/gdb/block.c b/gdb/block.c
index 6b58aaa..30fcc0e 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -170,7 +170,6 @@ call_site_for_pc (CORE_ADDR pc)
{
struct symtab *symtab;
void **slot;
- struct call_site call_site_local;
/* -1 as tail call PC is already behind the compilation unit range. */
@@ -179,8 +178,7 @@ call_site_for_pc (CORE_ADDR pc)
if (symtab == NULL || symtab->call_site_htab == NULL)
return NULL;
- call_site_local.pc = pc;
- slot = htab_find_slot (symtab->call_site_htab, &call_site_local, NO_INSERT);
+ slot = htab_find_slot (symtab->call_site_htab, &pc, NO_INSERT);
if (slot == NULL)
return NULL;
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c
index f23d2cc..398f0c6 100644
--- a/gdb/dwarf2-frame-tailcall.c
+++ b/gdb/dwarf2-frame-tailcall.c
@@ -26,6 +26,7 @@
#include "block.h"
#include "hashtab.h"
#include "exceptions.h"
+#include "gdbtypes.h"
static htab_t cache_htab;
@@ -192,14 +193,14 @@ pretend_pc (struct frame_info *this_frame, struct tailcall_cache *cache)
gdb_assert (next_levels >= 0);
if (next_levels < chain->callees)
- return chain->addr[chain->length - next_levels - 1];
+ return chain->call_site[chain->length - next_levels - 1]->pc;
next_levels -= chain->callees;
/* Otherwise CHAIN->CALLEES are already covered by CHAIN->CALLERS. */
if (chain->callees != chain->length)
{
if (next_levels < chain->callers)
- return chain->addr[chain->callers - next_levels - 1];
+ return chain->call_site[chain->callers - next_levels - 1]->pc;
next_levels -= chain->callers;
}
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 9ce7e35..3a9bf59 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -402,6 +402,21 @@ register %s (#%d) at %s"),
paddress (gdbarch, fs->pc));
}
+/* Virtual method table for execute_stack_op below. */
+
+static const struct dwarf_expr_context_funcs dwarf2_frame_ctx_funcs =
+{
+ read_reg,
+ read_mem,
+ no_get_frame_base,
+ no_get_frame_cfa,
+ no_get_frame_pc,
+ no_get_tls_address,
+ no_dwarf_call,
+ no_base_type,
+ no_push_dwarf_reg_entry_value
+};
+
static CORE_ADDR
execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
CORE_ADDR offset, struct frame_info *this_frame,
@@ -419,15 +434,7 @@ execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
ctx->addr_size = addr_size;
ctx->offset = offset;
ctx->baton = this_frame;
- ctx->read_reg = read_reg;
- ctx->read_mem = read_mem;
- ctx->get_frame_base = no_get_frame_base;
- ctx->get_frame_cfa = no_get_frame_cfa;
- ctx->get_frame_pc = no_get_frame_pc;
- ctx->get_tls_address = no_get_tls_address;
- ctx->dwarf_call = no_dwarf_call;
- ctx->get_base_type = no_base_type;
- ctx->push_dwarf_reg_entry_value = no_push_dwarf_reg_entry_value;
+ ctx->funcs = &dwarf2_frame_ctx_funcs;
dwarf_expr_push_address (ctx, initial, initial_in_stack_memory);
dwarf_expr_eval (ctx, exp, len);
@@ -1851,17 +1858,30 @@ add_fde (struct dwarf2_fde_table *fde_table, struct dwarf2_fde *fde)
#define DW64_CIE_ID ~0
#endif
+/* Defines the type of eh_frames that are expected to be decoded: CIE, FDE
+ or any of them. */
+
+enum eh_frame_type
+{
+ EH_CIE_TYPE_ID = 1 << 0,
+ EH_FDE_TYPE_ID = 1 << 1,
+ EH_CIE_OR_FDE_TYPE_ID = EH_CIE_TYPE_ID | EH_FDE_TYPE_ID
+};
+
static gdb_byte *decode_frame_entry (struct comp_unit *unit, gdb_byte *start,
int eh_frame_p,
struct dwarf2_cie_table *cie_table,
- struct dwarf2_fde_table *fde_table);
+ struct dwarf2_fde_table *fde_table,
+ enum eh_frame_type entry_type);
+
+/* Decode the next CIE or FDE, entry_type specifies the expected type.
+ Return NULL if invalid input, otherwise the next byte to be processed. */
-/* Decode the next CIE or FDE. Return NULL if invalid input, otherwise
- the next byte to be processed. */
static gdb_byte *
decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
struct dwarf2_cie_table *cie_table,
- struct dwarf2_fde_table *fde_table)
+ struct dwarf2_fde_table *fde_table,
+ enum eh_frame_type entry_type)
{
struct gdbarch *gdbarch = get_objfile_arch (unit->objfile);
gdb_byte *buf, *end;
@@ -1912,6 +1932,10 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
char *augmentation;
unsigned int cie_version;
+ /* Check that a CIE was expected. */
+ if ((entry_type & EH_CIE_TYPE_ID) == 0)
+ error (_("Found a CIE when not expecting it."));
+
/* Record the offset into the .debug_frame section of this CIE. */
cie_pointer = start - unit->dwarf_frame_buffer;
@@ -2077,6 +2101,10 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
/* This is a FDE. */
struct dwarf2_fde *fde;
+ /* Check that an FDE was expected. */
+ if ((entry_type & EH_FDE_TYPE_ID) == 0)
+ error (_("Found an FDE when not expecting it."));
+
/* In an .eh_frame section, the CIE pointer is the delta between the
address within the FDE where the CIE pointer is stored and the
address of the CIE. Convert it to an offset into the .eh_frame
@@ -2098,7 +2126,8 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
if (fde->cie == NULL)
{
decode_frame_entry (unit, unit->dwarf_frame_buffer + cie_pointer,
- eh_frame_p, cie_table, fde_table);
+ eh_frame_p, cie_table, fde_table,
+ EH_CIE_TYPE_ID);
fde->cie = find_cie (cie_table, cie_pointer);
}
@@ -2139,11 +2168,14 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
return end;
}
-/* Read a CIE or FDE in BUF and decode it. */
+/* Read a CIE or FDE in BUF and decode it. Entry_type specifies whether we
+ expect an FDE or a CIE. */
+
static gdb_byte *
decode_frame_entry (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
struct dwarf2_cie_table *cie_table,
- struct dwarf2_fde_table *fde_table)
+ struct dwarf2_fde_table *fde_table,
+ enum eh_frame_type entry_type)
{
enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE;
gdb_byte *ret;
@@ -2152,7 +2184,7 @@ decode_frame_entry (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
while (1)
{
ret = decode_frame_entry_1 (unit, start, eh_frame_p,
- cie_table, fde_table);
+ cie_table, fde_table, entry_type);
if (ret != NULL)
break;
@@ -2262,6 +2294,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
struct dwarf2_cie_table cie_table;
struct dwarf2_fde_table fde_table;
struct dwarf2_fde_table *fde_table2;
+ volatile struct gdb_exception e;
cie_table.num_entries = 0;
cie_table.entries = NULL;
@@ -2303,10 +2336,28 @@ dwarf2_build_frame_info (struct objfile *objfile)
if (txt)
unit->tbase = txt->vma;
- frame_ptr = unit->dwarf_frame_buffer;
- while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
- frame_ptr = decode_frame_entry (unit, frame_ptr, 1,
- &cie_table, &fde_table);
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ frame_ptr = unit->dwarf_frame_buffer;
+ while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+ frame_ptr = decode_frame_entry (unit, frame_ptr, 1,
+ &cie_table, &fde_table,
+ EH_CIE_OR_FDE_TYPE_ID);
+ }
+
+ if (e.reason < 0)
+ {
+ warning (_("skipping .eh_frame info of %s: %s"),
+ objfile->name, e.message);
+
+ if (fde_table.num_entries != 0)
+ {
+ xfree (fde_table.entries);
+ fde_table.entries = NULL;
+ fde_table.num_entries = 0;
+ }
+ /* The cie_table is discarded by the next if. */
+ }
if (cie_table.num_entries != 0)
{
@@ -2324,10 +2375,39 @@ dwarf2_build_frame_info (struct objfile *objfile)
&unit->dwarf_frame_size);
if (unit->dwarf_frame_size)
{
- frame_ptr = unit->dwarf_frame_buffer;
- while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
- frame_ptr = decode_frame_entry (unit, frame_ptr, 0,
- &cie_table, &fde_table);
+ int num_old_fde_entries = fde_table.num_entries;
+
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ frame_ptr = unit->dwarf_frame_buffer;
+ while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+ frame_ptr = decode_frame_entry (unit, frame_ptr, 0,
+ &cie_table, &fde_table,
+ EH_CIE_OR_FDE_TYPE_ID);
+ }
+ if (e.reason < 0)
+ {
+ warning (_("skipping .debug_frame info of %s: %s"),
+ objfile->name, e.message);
+
+ if (fde_table.num_entries != 0)
+ {
+ fde_table.num_entries = num_old_fde_entries;
+ if (num_old_fde_entries == 0)
+ {
+ xfree (fde_table.entries);
+ fde_table.entries = NULL;
+ }
+ else
+ {
+ fde_table.entries = xrealloc (fde_table.entries,
+ fde_table.num_entries *
+ sizeof (fde_table.entries[0]));
+ }
+ }
+ fde_table.num_entries = num_old_fde_entries;
+ /* The cie_table is discarded by the next if. */
+ }
}
/* Discard the cie_table, it is no longer needed. */
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index ee417bc..84f114a 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -466,9 +466,9 @@ dwarf_get_base_type (struct dwarf_expr_context *ctx, ULONGEST die, int size)
{
struct type *result;
- if (ctx->get_base_type)
+ if (ctx->funcs->get_base_type)
{
- result = ctx->get_base_type (ctx, die);
+ result = ctx->funcs->get_base_type (ctx, die);
if (result == NULL)
error (_("Could not find type for DW_OP_GNU_const_type"));
if (size != 0 && TYPE_LENGTH (result) != size)
@@ -902,7 +902,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
case DW_OP_breg31:
{
op_ptr = read_sleb128 (op_ptr, op_end, &offset);
- result = (ctx->read_reg) (ctx->baton, op - DW_OP_breg0);
+ result = (ctx->funcs->read_reg) (ctx->baton, op - DW_OP_breg0);
result += offset;
result_val = value_from_ulongest (address_type, result);
}
@@ -911,7 +911,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
{
op_ptr = read_uleb128 (op_ptr, op_end, ®);
op_ptr = read_sleb128 (op_ptr, op_end, &offset);
- result = (ctx->read_reg) (ctx->baton, reg);
+ result = (ctx->funcs->read_reg) (ctx->baton, reg);
result += offset;
result_val = value_from_ulongest (address_type, result);
}
@@ -931,14 +931,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
/* FIXME: cagney/2003-03-26: This code should be using
get_frame_base_address(), and then implement a dwarf2
specific this_base method. */
- (ctx->get_frame_base) (ctx->baton, &datastart, &datalen);
+ (ctx->funcs->get_frame_base) (ctx->baton, &datastart, &datalen);
dwarf_expr_eval (ctx, datastart, datalen);
if (ctx->location == DWARF_VALUE_MEMORY)
result = dwarf_expr_fetch_address (ctx, 0);
else if (ctx->location == DWARF_VALUE_REGISTER)
- result
- = (ctx->read_reg) (ctx->baton,
- value_as_long (dwarf_expr_fetch (ctx, 0)));
+ result = (ctx->funcs->read_reg) (ctx->baton,
+ value_as_long (dwarf_expr_fetch (ctx, 0)));
else
error (_("Not implemented: computing frame "
"base using explicit value operator"));
@@ -1023,7 +1022,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
else
type = address_type;
- (ctx->read_mem) (ctx->baton, buf, addr, addr_size);
+ (ctx->funcs->read_mem) (ctx->baton, buf, addr, addr_size);
/* If the size of the object read from memory is different
from the type length, we need to zero-extend it. */
@@ -1232,7 +1231,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
break;
case DW_OP_call_frame_cfa:
- result = (ctx->get_frame_cfa) (ctx->baton);
+ result = (ctx->funcs->get_frame_cfa) (ctx->baton);
result_val = value_from_ulongest (address_type, result);
in_stack_memory = 1;
break;
@@ -1248,7 +1247,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
returned. */
result = value_as_long (dwarf_expr_fetch (ctx, 0));
dwarf_expr_pop (ctx);
- result = (ctx->get_tls_address) (ctx->baton, result);
+ result = (ctx->funcs->get_tls_address) (ctx->baton, result);
result_val = value_from_ulongest (address_type, result);
break;
@@ -1321,13 +1320,13 @@ execute_stack_op (struct dwarf_expr_context *ctx,
case DW_OP_call2:
result = extract_unsigned_integer (op_ptr, 2, byte_order);
op_ptr += 2;
- ctx->dwarf_call (ctx, result);
+ ctx->funcs->dwarf_call (ctx, result);
goto no_push;
case DW_OP_call4:
result = extract_unsigned_integer (op_ptr, 4, byte_order);
op_ptr += 4;
- ctx->dwarf_call (ctx, result);
+ ctx->funcs->dwarf_call (ctx, result);
goto no_push;
case DW_OP_GNU_entry_value:
@@ -1344,8 +1343,8 @@ execute_stack_op (struct dwarf_expr_context *ctx,
if (dwarf_reg != -1)
{
op_ptr += len;
- ctx->push_dwarf_reg_entry_value (ctx, dwarf_reg, 0 /* unused */,
- -1);
+ ctx->funcs->push_dwarf_reg_entry_value (ctx, dwarf_reg,
+ 0 /* unused */, -1);
goto no_push;
}
@@ -1356,8 +1355,9 @@ execute_stack_op (struct dwarf_expr_context *ctx,
if (deref_size == -1)
deref_size = ctx->addr_size;
op_ptr += len;
- ctx->push_dwarf_reg_entry_value (ctx, dwarf_reg, 0 /* unused */,
- deref_size);
+ ctx->funcs->push_dwarf_reg_entry_value (ctx, dwarf_reg,
+ 0 /* unused */,
+ deref_size);
goto no_push;
}
@@ -1392,7 +1392,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
op_ptr = read_uleb128 (op_ptr, op_end, &type_die);
type = dwarf_get_base_type (ctx, type_die, 0);
- result = (ctx->read_reg) (ctx->baton, reg);
+ result = (ctx->funcs->read_reg) (ctx->baton, reg);
result_val = value_from_ulongest (address_type, result);
result_val = value_from_contents (type,
value_contents_all (result_val));
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-16 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-16 9:49 [SCM] archer-jankratochvil-entryval: +NOT_FOUND_ERROR jkratoch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).