Commit Graph

19 Commits

Author SHA1 Message Date
David Anderson
7b73565d3c Fix a couple indent mistakes.
dwarfdump:
dwarfdump.c
esb.c
2016-04-25 14:34:56 -07:00
David Anderson
08efeebcf3 Remove the unneccessary typedef for 'string'
and just use char*.

Ensure the getopt tests still work.

modified:   dwarfdump/dwarfdump.c
modified:   dwarfdump/dwgetopt.c
modified:   dwarfdump/esb.c
modified:   dwarfdump/esb.h
modified:   dwarfdump/getopttest.c
modified:   dwarfdump/globals.h
modified:   dwarfdump/print_die.c
modified:   dwarfdump/print_frames.c
modified:   dwarfdump/print_lines.c
modified:   dwarfdump/print_strings.c
modified:   dwarfdump/tag_attr.c
modified:   dwarfdump/tag_tree.c

Fixing errnumber->string array and arranging
that we test it during build.

modified:   libdwarf/Makefile.in
renamed:    libdwarf/dwarf_error.c -> libdwarf/dwarf_errmsg_list.c
modified:   libdwarf/dwarf_error.c
2016-04-25 13:01:30 -07:00
Carlos Alberto Enciso
78003aa6c7 Printing using the 'esb' module was broken. It seems to work
because the default internal buffer size (240), was big enough
    to receive the resulting output.

    esb.c, esb.h:
        * Missing prefix 'esb' for 'allocate_more'
        * Initial buffer size reduced to 16.
        * New function 'esb_open_null_device': open 'null' device
        * New function 'esb_close_null_device': close 'null' device
        * New function 'esb_allocate_more_if_needed': allocate more
          space if required, leaving the contents unchanged, so the
          caller, does not need to worry about it.
          There are 2 cases:
          Windows: use the 'null' device to get the required space
          UNIX: use a big buffer (512). But if the result is bigger,
          the original problem will be shown.
        * The function 'esb_append_printf_ap', now takes care of
          increasing the buffer if needed.

     dwarfdump.c: In the case of windows, open and close the 'null'
         device, in order to setup the esb module.
2016-04-21 13:44:38 +01:00
David Anderson
d9d40e4d80 Add additional flags to the --enable-wall option.
dwarfdump/configure.in
libdwarf/configure.in

dwarfdump/configure (regenerate)
libdwarf/configure (regenerate)

These fix compiler warnings
dwarfdump/dwarf_tsearchbal.c
dwarfdump/dwarfdump.c
dwarfdump/dwconf.c
dwarfdump/dwconf.h
dwarfdump/esb.c
dwarfdump/globals.h
dwarfdump/print_debugfission.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_sections.c

libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_gdbindex.c
libdwarf/dwarf_gdbindex.h
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_query.c
libdwarf/dwarf_tsearchhash.c
2016-01-21 15:42:58 -08:00
David Anderson
9565964f26 Remove ;; where it was just an accident.
Make header reading idempotent with ifndef/define
dwarfdump/dwarfdump.c
dwarfdump/esb.c  (avoid doing append of empty string).
dwarfdump/esb.h
dwarfdump/globals.h
dwarfdump/naming.h
dwarfdump/print_frames.c
dwarfdump/print_lines.c

Ensure declarations first in a block (avoid C99 isms).
libdwarf/dwarf_form.c
libdwarf/dwarf_frame2.c (check for too-short section)
libdwarf/dwarf_loc.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_query.c
libdwarf/dwarf_util.c
2016-01-19 16:25:30 -08:00
David Anderson
f0a569e3d8 esb.c: add comment that arguments assumed non-null
in esb.c
2015-12-11 08:49:15 -08:00
David Anderson
384fcc8d86 dwarfdump/esb.c
esb_get_copy() failed to account for the trailing NUL.
esb_get_copy was not being tested by SELFTEST.

Fixed both issues.
2015-12-10 09:41:22 -08:00
David Anderson
ad33389a2c dwarfdump (not libdwarf): removed obsolete postal
address and web address about SGI.
Historical versions still shown in the
DWARFDUMPCOPYRIGHT file.
2015-01-31 09:42:29 -08:00
David Anderson
46a28e7d5f Now getopt is hard coded (NetBSD BSD license) in libdwarf
so we get consistent behavior.  Specifically allowing the
notion of :: in the option list.
Fixed issues with handling files with both .debug_types and
.debug_info (got spurious warnings with -ky -kd, for example)
on a .dwp object.
Corrected a couple places where we needed to reset a static
variable (renamed the static variable for readability and removed
it from the globals variables).
2015-01-24 16:28:25 -08:00
David Anderson
68ee12715f use of va_list requires stdarg.h, but that was not
everywhere it needed to be.
By accident, GNU libc hid that omission.
Also removed a couple unused variables and some
trailing whitespace.
2015-01-15 16:15:45 -08:00
David Anderson
037d4d0c79 Upate version string. Add va_end() appropriate places.
Move one local variable declaration for c90 conformance.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump/esb.c
dwarfdump/tag_common.c

libdwarf/dwarf_init_finish.c
libdwarf/dwarf_util.c
2015-01-12 13:39:58 -08:00
David Anderson
e081aac66c dwarfdump: Removing trailing whitespace, fixing indents.
esb.c
print_die.c
tag_attr.c
2015-01-08 13:47:20 -08:00
David Anderson
71cd071eb2 Now the new dwarfdump checking options work. 2015-01-08 13:09:21 -08:00
Carlos Alberto Enciso
87dd1d943c 1) Allow 'bad_line_input' to receive variable number of arguments
2) Extended the functionality of 'esb_append_printf' to handle a pointer
   to the variable arguments.
2014-09-10 09:45:20 +01:00
David Anderson
affafa89fb Removed trailing (and useless) whitespace from all the lines
containing it.  Many many files had such.
2014-01-29 15:02:07 -08:00
David Anderson
d522c98f03 dwarfdump[2]: commentary and indenting fixes (very few).
dwarfexample: Adds a --check option to show in detail
     when the DW_AT_high_pc is a constant vs offset,
     at least for subprograms.
dwarfgen: Now handles class constant (writes to output)
     and fixes missing handling of DW_FORM_data4/8 in
     global references.
     Adds -h option telling dwarfgen to alter a high pc
     from address class to const class (and adjusts
     the value appropriately).  So we can create
     testcases without having a too-recent compiler.
libdwarf: Fix an error no one should ever see (programmer
     failed to run a simple test!) so it returns DW_DLV_ERROR
     in case it happens.
     Add dwarf_highpc_b() function to consumer code.
     dwarf_add_AT_any_value_sleb() and  dwarf_add_AT_any_value_uleb()
     to producer code.
     Update libdwarf2.1.mm and libdwarf2p.1.mm to reflect the
     new functions.
2013-08-14 08:15:02 -07:00
David Anderson
791398ca4d Makes it easier to build under FreeBSD.
Fixes signed/unsigned comparison issues noted by -Wsign-compare
2013-01-16 15:51:41 -08:00
David Anderson
7647aaeca8 Everything changed. New indentation. Many new DWARF correctness
tests.  New options.   Error summaries reported by compiler name.
2011-03-29 13:43:05 -07:00
David Anderson
637442ea0b Initial commit. Content is the libdwarf-20110113.tar.gz
last-released-libdwarf and dwarfdump.
2011-03-19 11:38:11 -07:00