# Question about  gcc/gdb



## Reg Clemens (Oct 8, 2015)

I am trying to debug a legacy program.
I compile with `gcc -g`, and then try to run it under `gdb`.  I get the messages:

```
Dwarf Error: wrong version in compilation unit header
```
and
	
	



```
(no debugging symbols found)
```
What gives?  Is there another debugger I should be trying to use?


----------



## fnoyanisi (Oct 8, 2015)

Your program must be using some shared objects (libraries) that are compiled with different debug options.

Try compiling the your code with the static option (including ecerything, standard library etc...), or recompile your shared objects used with your code with `-g` and try compiling your program once again with debug option enabled.


----------



## junovitch@ (Oct 9, 2015)

Does devel/gdb work?  Off the top of my head I can't remember the differences between the port and base GDB but I thought there were indeed some differences in what they support.


----------

