public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* insight gdb all messed up...
@ 2000-03-03 18:28 Joseph Nicholas Yarbrough
  2000-03-03 18:38 ` Keith Seitz
  2000-03-03 18:39 ` James Ingham
  0 siblings, 2 replies; 3+ messages in thread
From: Joseph Nicholas Yarbrough @ 2000-03-03 18:28 UTC (permalink / raw)
  To: insight

ok. first calling the main executable gdb is messed up.. I had to change all of
my other debuggin scripts to add --nw... but I can get past that 1-1/2 minute
tcl programming job. but opening a source file with the 20000204 version just
doesn't work.

(gdb) source main.c
main.c:1: Error in sourced command file:
Undefined command: "".  Try "help".

that is the error... to be precise. I love asm as much as the next guy, but
being able to see the C code can be helpfull. seeing as I debug c code. ;]
it seems to look for init.c as the code. I renamed main.c to init.c, and list
worked. But, when I tried to set a breakpoint with break. it broke.

any ideas on something I might be doing wrong?

thanks for this nice looking (although currently unusable) debugger.
I cant wait to get it running. 

PimpSmurf
a.k.a. Joseph Nicholas Yarbrough

also... thought about adding a button to rebuild packages with make?

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

* Re: insight gdb all messed up...
  2000-03-03 18:28 insight gdb all messed up Joseph Nicholas Yarbrough
@ 2000-03-03 18:38 ` Keith Seitz
  2000-03-03 18:39 ` James Ingham
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2000-03-03 18:38 UTC (permalink / raw)
  To: Joseph Nicholas Yarbrough; +Cc: insight

Joseph Nicholas Yarbrough wrote:
> 
> (gdb) source main.c
> main.c:1: Error in sourced command file:
> Undefined command: "".  Try "help".
> 

Ummm....

(gdb) help source
Read commands from a file named FILE.
Note that the file ".gdbinit" is read automatically in this way
when gdb is started.

The "source" command does not do what you think it does.

> that is the error... to be precise. I love asm as much as the next guy, but
> being able to see the C code can be helpfull. seeing as I debug c code. ;]
> it seems to look for init.c as the code. I renamed main.c to init.c, and list
> worked. But, when I tried to set a breakpoint with break. it broke.
> 
> any ideas on something I might be doing wrong?

Ok, I'll say the obvious thing first (just in case ;-): you compiled
with debug info, right? ("-g" to the compiler). If so, gdbtk should have
been able to find your sources. If not, try adding the path to the
sources using the "dir" command in the console window. Sorry, there is
no GUI for this yet (although I've begged for time to do it for a long
time now).

(gdb) help dir
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.

> also... thought about adding a button to rebuild packages with make?

That would be easy enough: gdb supports both a "make" command and access
to the shell. ("make" does the same thing as "shell make".)

Keith
-- 
Why chat when you can Firetalk?
Firetalk ID: Keith (10320)
www.firetalk.com

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

* Re: insight gdb all messed up...
  2000-03-03 18:28 insight gdb all messed up Joseph Nicholas Yarbrough
  2000-03-03 18:38 ` Keith Seitz
@ 2000-03-03 18:39 ` James Ingham
  1 sibling, 0 replies; 3+ messages in thread
From: James Ingham @ 2000-03-03 18:39 UTC (permalink / raw)
  To: Joseph Nicholas Yarbrough; +Cc: insight

Joseph,

Sorry, there is not enough in your message to go on, so I can't help
that much...  If you actually want help, you have to send a recipe that
I can follow that leads to bad behavior, and then describe the
behavior.  Just saying it is broken is useless...  You also have to
tell me what your host & targets are, etc...

 > ok. first calling the main executable gdb is messed up.. 

Messed up how?

 > I had to change all of
 > my other debuggin scripts to add --nw... but I can get past that 1-1/2 minute
 > tcl programming job. but opening a source file with the 20000204 version just
 > doesn't work.
 > 
 > (gdb) source main.c
 > main.c:1: Error in sourced command file:
 > Undefined command: "".  Try "help".

What are you trying to do here?  The gdb "source" command treats the
file you give it as a list of gdb commands:

(gdb) help source
Read commands from a file named FILE.
Note that the file ".gdbinit" is read automatically in this way
when gdb is started.

I doubt that main.c is a valid list of gdb commands...  If it is, you
write mighty strange C code...

To see source code in gdb, use the "list" command.

 > 
 > that is the error... to be precise. I love asm as much as the next guy, but
 > being able to see the C code can be helpfull. seeing as I debug c code. ;]
 > it seems to look for init.c as the code. I renamed main.c to init.c, and list
 > worked. But, when I tried to set a breakpoint with break. it broke.
 > 
 > any ideas on something I might be doing wrong?
 > 
 > thanks for this nice looking (although currently unusable) debugger.
 > I cant wait to get it running. 
 > 
 > PimpSmurf
 > a.k.a. Joseph Nicholas Yarbrough
 > 
 > also... thought about adding a button to rebuild packages with make?
 > 

This is handled from the CodeFusion IDE, so we don't add it to
Insight.

Jim

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions, a Red Hat Company                      

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

end of thread, other threads:[~2000-03-03 18:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-03 18:28 insight gdb all messed up Joseph Nicholas Yarbrough
2000-03-03 18:38 ` Keith Seitz
2000-03-03 18:39 ` James Ingham

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).