From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: [2/4] RFC: check psymtabs_addrmap before reading FDEs
Date: Wed, 30 Jun 2010 22:37:00 -0000 [thread overview]
Message-ID: <m31vboqh98.fsf@fleche.redhat.com> (raw)
This patch changes dwarf2_frame_find_fde to check psymtabs_addrmap
before trying to read the FDE data.
I am not totally convinced this is safe, so comments are especially
appreciated here.
This patch is actually independent of the rest of the series; it is just
a possible optimization I found while working in this area.
Tom
b/gdb/ChangeLog:
2010-06-30 Tom Tromey <tromey@redhat.com>
* dwarf2-frame.c (dwarf2_frame_find_fde): Check psymtabs_addrmap.
From 3836ada921fcc8605362f51c163774f53d3db1c9 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@redhat.com>
Date: Wed, 30 Jun 2010 10:15:34 -0600
Subject: [PATCH 2/4] check psymtabs_addrmap before decoding FDEs
---
gdb/ChangeLog | 4 ++++
gdb/dwarf2-frame.c | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 9576341..e7c5d31 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -32,6 +32,7 @@
#include "objfiles.h"
#include "regcache.h"
#include "value.h"
+#include "addrmap.h"
#include "gdb_assert.h"
#include "gdb_string.h"
@@ -1593,6 +1594,12 @@ dwarf2_frame_find_fde (CORE_ADDR *pc)
CORE_ADDR offset;
CORE_ADDR seek_pc;
+ if (objfile->psymtabs_addrmap)
+ {
+ if (!addrmap_find (objfile->psymtabs_addrmap, *pc))
+ continue;
+ }
+
fde_table = objfile_data (objfile, dwarf2_frame_objfile_data);
if (fde_table == NULL)
{
--
1.6.2.5
next reply other threads:[~2010-06-30 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 22:37 Tom Tromey [this message]
2010-07-01 15:41 ` Daniel Jacobowitz
2010-07-01 16:13 ` Mark Kettenis
2010-07-01 16:56 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31vboqh98.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox