summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-07-02 00:57:27 -0700
committerRoland McGrath <[email protected]>2009-07-02 00:57:27 -0700
commit6f3eb01147ecd46d5519ba4a49d1d085468372dc (patch)
tree9cfe07a5f4348992a0f082b9787366c7372599fb /src
parentfdbe23862600c7d1b34906430e0c2586ebd00edb (diff)
parent0bce6cec0568c7aa36c8e5998cb2fd709f3ee1de (diff)
Merge roland/dwarf-collector, fiddle constructors more.upstream/roland/dwarf_edit
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/dwarfcmp.cc19
-rw-r--r--src/readelf.c11
3 files changed, 36 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a0402416..190a33d7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-01 Roland McGrath <[email protected]>
+
+ * dwarfcmp.cc (talker): Update constructor parameters.
+
2009-06-19 Roland McGrath <[email protected]>
* dwarfcmp.cc: Revamp using dwarf_comparator.
@@ -179,6 +183,12 @@
* dwarflint.c: Checking for zero padding and unreferenced bytes.
CU size and padding at the end of CU are now checked.
+2009-06-28 Roland McGrath <[email protected]>
+
+ * readelf.c (print_address_names): New static variable.
+ (options, parse_opt): Grok -N/--numeric-addresses to clear it.
+ (format_dwarf_addr): Don't look up name if !print_address_names.
+
2009-06-13 Ulrich Drepper <[email protected]>
* ldgeneric.c: Don't use deprecated libelf functions.
diff --git a/src/dwarfcmp.cc b/src/dwarfcmp.cc
index cffa5fa1..677a5beb 100644
--- a/src/dwarfcmp.cc
+++ b/src/dwarfcmp.cc
@@ -129,6 +129,7 @@ template<class dwarf1, class dwarf2>
struct talker : public dwarf_ref_tracker<dwarf1, dwarf2>
{
typedef dwarf_tracker_base<dwarf1, dwarf2> _base;
+ typedef dwarf_ref_tracker<dwarf1, dwarf2> _tracker;
typedef typename _base::cu1 cu1;
typedef typename _base::cu2 cu2;
typedef typename _base::die1 die1;
@@ -139,7 +140,17 @@ struct talker : public dwarf_ref_tracker<dwarf1, dwarf2>
const typename dwarf1::debug_info_entry *a_;
const typename dwarf2::debug_info_entry *b_;
- inline talker () : a_ (NULL), b_ (NULL) {}
+ inline talker ()
+ : a_ (NULL), b_ (NULL)
+ {}
+
+ inline talker (const talker &proto, typename _tracker::reference_match &m,
+ const typename _tracker::left_context_type &l, const die1 &a,
+ const typename _tracker::right_context_type &r, const die2 &b)
+ : _tracker (static_cast<const _tracker &> (proto), m, l, a, r, b),
+ a_ (NULL), b_ (NULL)
+ {
+ }
inline ostream &location () const
{
@@ -314,8 +325,10 @@ main (int argc, char *argv[])
if (test_writer)
{
- dwarf_edit edit1 (file1);
- dwarf_edit edit2 (file2);
+ dwarf_ref_tracker<dwarf_edit, dwarf> t1;
+ dwarf_ref_tracker<dwarf_edit, dwarf> t2;
+ dwarf_edit edit1 (file1, &t1);
+ dwarf_edit edit2 (file2, &t2);
test_classes (file1, file2, edit1, edit2, same);
{
diff --git a/src/readelf.c b/src/readelf.c
index 8564c6ad..e925565b 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -101,6 +101,8 @@ static const struct argp_option options[] =
0 },
{ NULL, 0, NULL, 0, N_("Output control:"), 0 },
+ { "numeric-addresses", 'N', NULL, 0,
+ N_("Do not find symbol names for addresses in DWARF data"), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -166,6 +168,9 @@ static bool print_archive_index;
/* True if any of the control options except print_archive_index is set. */
static bool any_control_option;
+/* True if we should print addresses from DWARF in symbolic form. */
+static bool print_address_names = true;
+
/* Select printing of debugging sections. */
static enum section_e
{
@@ -407,6 +412,9 @@ parse_opt (int key, char *arg,
add_dump_section (arg);
any_control_option = true;
break;
+ case 'N':
+ print_address_names = false;
+ break;
case ARGP_KEY_NO_ARGS:
fputs (gettext ("Missing file name.\n"), stderr);
goto do_argp_help;
@@ -3062,7 +3070,8 @@ format_dwarf_addr (Dwfl_Module *dwflmod,
{
/* See if there is a name we can give for this address. */
GElf_Sym sym;
- const char *name = dwfl_module_addrsym (dwflmod, address, &sym, NULL);
+ const char *name = print_address_names
+ ? dwfl_module_addrsym (dwflmod, address, &sym, NULL) : NULL;
if (name != NULL)
sym.st_value = address - sym.st_value;