public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How tu run GDB for large C Application
@ 2007-11-19  6:48 Sangamesh B
  2007-11-19  8:08 ` Bernhard Walle
  0 siblings, 1 reply; 2+ messages in thread
From: Sangamesh B @ 2007-11-19  6:48 UTC (permalink / raw)
  To: GDB Mailing List

 Hi all GDB Users,

       I've to debug one application, written in C. It consists of
many files and after compilation creates one executable. It makes use
of two input files and some command line arguments. In the makefile
I've used -g as DEBUG flag.

      I'm not getting how to use GDB to debug this application.

      For example,

      X is the executable created from the following object files.
      1.o, -> 1.c
      2.o, -> 2.c
      3.o, -> 3.c
      4.o, -> 4.c
      5.o. -> 5.c

      To debug with gdb, which one to use? With X or individaully with .o files.

      gdb X shows   "not in executable format: File format not recognized"

      How/Where to give the input files for the program and command
line arguments?

      Please help me.

regards,
Sangamesh
Engineer - HPTC

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How tu run GDB for large C Application
  2007-11-19  6:48 How tu run GDB for large C Application Sangamesh B
@ 2007-11-19  8:08 ` Bernhard Walle
  0 siblings, 0 replies; 2+ messages in thread
From: Bernhard Walle @ 2007-11-19  8:08 UTC (permalink / raw)
  To: gdb

* Sangamesh B <forum.san@gmail.com> [2007-11-19 07:48]:
> 
>       gdb X shows   "not in executable format: File format not recognized"

What does "file X" say? Do you use autoconf/automake/libtool to
compile your application?

Then this is a script, and your binary in somewhere in .libs. The
script just adds LD_LIBRARY_PATH so that you can use shared libraries
from the same application without installing them.


Thanks,
   Bernhard
-- 
"Ich dachte immer, UNIX ist was für Leute, denen es gefällt,
auf einen Bildschirm zu starren, auf dem es aussieht, als hätte
sich gerade ein Gürteltier auf der Tastatur gewälzt."
        -- Stefan Schneider

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-19  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-19  6:48 How tu run GDB for large C Application Sangamesh B
2007-11-19  8:08 ` Bernhard Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).