public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <kseitz@firetalk.com>
To: Joseph Nicholas Yarbrough <pimpsmurf@sostech.net>
Cc: insight@sourceware.cygnus.com
Subject: Re: insight gdb all messed up...
Date: Fri, 03 Mar 2000 18:38:00 -0000	[thread overview]
Message-ID: <38C0771D.ED227AD1@firetalk.com> (raw)
In-Reply-To: <00030321330000.02405@pimpsmurf>

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

  reply	other threads:[~2000-03-03 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-03 18:28 Joseph Nicholas Yarbrough
2000-03-03 18:38 ` Keith Seitz [this message]
2000-03-03 18:39 ` James Ingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38C0771D.ED227AD1@firetalk.com \
    --to=kseitz@firetalk.com \
    --cc=insight@sourceware.cygnus.com \
    --cc=pimpsmurf@sostech.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).