On 19 July 2011 03:41, Brian Hutchinson <b.hutch...@gmail.com> wrote:
> Hi,
>
> I'm not quite sure if my gdb is hosed up or if it is my openocd build.
>  OpenOCD version is Open On-Chip Debugger
> 0.5.0-dev-00959-gd6c42bf-dirty (2011-07-18-18:35)
>
> Is there anything special that needs to be done to build openocd with
> debug symbols turned on (-g)?
>
> When I do a build, I see the -g option being used and I didn't do
> anything special to turn it on.  I'm not an automake expert but I see
> that in the Makefile CFLAGS has -g set so I guess that is where it is
> getting it so it looks like debug symbols "should" be included to me.
>
> I'm on a Debian amd64 machine and when I do gdb openocd I get the
> following output:
>
> hutch@neo:~/openocd/openocd/src$ gdb ./openocd
> GNU gdb (GDB) 7.1
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> "/home/hutch/openocd/openocd/src/openocd": not in executable format:
> File format not recognized
> (gdb)
>
> When I do file I get:
> hutch@neo:~/openocd/openocd/src$ file ./openocd
> ./openocd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not
> stripped
>
> So I'm kind of stumped as to what the problem is.
>

Debug info (-g) is on by default.
Have a read of the following if using shared libs:
http://repo.or.cz/w/openocd.git/blob/HEAD:/BUGS

I tend to configure with --disable-shared so you do not run into this
sort of problem.

Cheers
Spen
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to