0

I'm trying to debug a program that uses DWARF-4 but my gdb is too old and only understands DWARF-2.

I can't update gdb and I can't recompile, so I need a way to convert them, maybe with some binutils tool?

Sergio Martins
  • 897
  • 2
  • 8
  • 18

1 Answers1

2

I have never heard of a tool that does this.

If this were my problem I would probably hack up either objcopy or dwz to do it.

I wonder why you can't update gdb though. It isn't hard to build your own.

Tom Tromey
  • 21,507
  • 2
  • 45
  • 63
  • 1
    Since this question has qnx tag, the difficulty in updating GDB is probably in setting up toolchain, etc. for QNX target. In that case, setting up remote debugger will likely be orders of magnitude easier than converting DWARF4 into DWARF2. – Employed Russian Jan 12 '14 at 21:36
  • I'm using the remote debugger that QNX provides (nto-gdb), and it's too old. Not sure I can just use another remote gdb, since nto-gdb supports pdebug ( which is what QNX uses instead of gdbserver ). – Sergio Martins Jan 12 '14 at 22:43
  • 1. if your ntoxxx-gdb is older than – maverick Jan 13 '14 at 17:01
  • 1. if your ntoxxx-gdb is older than 7.5 then you can grab 7.5 at: http://community.qnx.com/sf/frs/do/listReleases/projects.toolchain/frs.gdb; must apologize for not being able to say for sure whether it supports DWARF-4. 2. If you are a legitimate customer of QNX then you do have the right to request the source-code of GDB, given that it is GNU software. You really do have the right and QNX is really respecting the law. The source should let you integrate with trunk GDB if that's something you are interested in. – maverick Jan 13 '14 at 17:08