[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/13438] New: [Wishlist] objdump option to disassemble a sym

From: ben_golding at yahoo dot co.uk
Subject: [Bug binutils/13438] New: [Wishlist] objdump option to disassemble a symbol/function
Date: Fri, 25 Nov 2011 12:50:05 +0000


             Bug #: 13438
           Summary: [Wishlist] objdump option to disassemble a
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified

This is an enhancement request for disassembler ease-of-use.
IT probably makes sense to implement in objdump (vs. other binutils).

Compile a small program:
  % cat foo.cpp
  int main(int, char**) { return 0; }
  % g++ -g -O0 -o foo foo.cpp

Disassemble the main() function:
  % objdump -d -j .text foo | less
  # Search the output for <main> in less pager

Proposed enhancement works like this:
  % objdump -d -Q main
  # Disassembly is only shown for symbol 'main'
Detailed description of the enhancement:

[1] A new switch (-Q chosen for the sake of argument) allows to specify one or
more symbols to disassemble.

[1a] TBD if -Q sym1 -Q sym2 or -Q sym1,sym2 is preferred.

[2] The correct section(s) are found automatically. No -j is required.
[2a] TBD what behaviour makes sense with -j and -Q together (filter only
requested sections?).

[3] Expected usage of -Q together with -d or -D and optional -S.
[3a] TBD what effect -d -Q has (vs. -D -Q) when the requested symbol(s) are in
a non-executable section (filter non-executable sections?).
[3b] TBD whether -Q could be used sense alone (with implied -d or -D).
[3c] Also TBD what behaviour makes sense with -t or -T or -r or -R (filter only
requested symbols from symbol table?).

[4] When -Q used together with -C, demangled names are expected (in C++ for
instance). Without -C mangled names are expected. Examples:
  objdump -dC -Q 'foo::foo()'
  objdump -d  -Q _ZN12fooC1Ev

binutils built for arm-none-eabi on RHEL 4.0 U8

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]