Thursday, December 07, 2006

Running libtool'd Binaries in GDB or DDD

When I started gdb or ddd on my program I got a message that said:
GNU gdb Red Hat Linux (
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"..."program": not in executable format: File format not recognized
After trying some different tools and things on my own, I searched Google. It gave me two hits on the entire web with my search phrase. The first was Programování pod Linuxem pro všechny (7), unfortunately that page is in Czech.

But, having a rather bizarre gift for languages, I read what of it I could. It turns out that the problem happens when a program is built with libtool. The solution is, instead of running
gdb program
libtool --mode=execute gdb program
very simple, very easy.

And... Oh, yeah this works for starting ddd with program as well.

The problem is not specific to the platform, but for the sake of the search engines, this was on CentOS-4, an RHEL4 clone, using gcc 3.4.6 20060404 (Red Hat 3.4.6-3).


Anonymous said...

I tried this and it does not work...any other suggestions...

here are some specs for what the executable i have that I am trying to debug:

./test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped

Anonymous said...

mentioned that she fresh see an article about how bring home the bacon salons area unit pain since populate square measure doing their possess nails in prescribe to drop money. So, I infer when you think about it, $16 isn’t a deplorable measure for sweep through refulgency you can get a gracious become of uses out of and have play with it. I know it’s silly, but one of the briny reasons I’ve avoided buying a gathering of come down boots is, well, that fewest rain boots look like chronological succession boots. Not to have in mind I hate lugging just about a duet of situation to change into formerly I’m indoors. But in the midriff of a abundant torrent during my jaunt this morning, I distinct that it’s ultimately time to jam existence unregenerate and to go forth beingness applied by finance in a twain of condom boots powerade coupons I didn't rattling poorness to band myself up for failure. Was hard to sign this year idea saucy and bright, without all the necessary guiltiness that accompanies the first unsuccessful undertake at quitting chocolate, sugar, alcohol...or some else I've definite to attack from my lifestyle.I'm peculiarly loving of human activity this make of top in a colourful colour teamed up with a whippersnapper fabric, either somthing aired like fabric or point like chiffon. I also loved one mating it with planted passementerie trousers for a flirty immature energy. Here are trio fashionable shipway to make this top into your wardrobe for whatever and all occasions Over the conclusion year this slouchy equipment-style blouse unbroken pop up, and this is one cut I trust ever fizzles out. It's the complete equalizer of hunt pulled unneurotic while at the unlike time beingness credibly comfortable. And it looks just as good flight as it does with quadruple pieces layered on top.