From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Ingham To: Thomas A Peterson Cc: insight@sourceware.cygnus.com Subject: Re: A couple of suggestions/questions Date: Mon, 04 Oct 1999 14:13:00 -0000 Message-id: <14329.6364.223747.569422@leda.cygnus.com> References: <199910041928.OAA23658@wocket.htc.honeywell.com> X-SW-Source: 1999-q4/msg00001.html Tom, > It would be nice if the pop-up view of a variables was available when > viewing inline C++ functions that are in header files. I end up doing a > View->Local Variables to get around this missing feature. I don't understand what you want here? Do you want a popup on the main source window, along with the File & Function box, or what? > > For some reason the source file list does not contain the assembly language > files that went into the executable. Only the headers, C, and C++ files > are in the list. Is this a limitation of gdb? This is a limitation of the assembler you are using. It has to put the correct file symbol into the debug information, or gdb will never read it. Gas on the Sun, for instance, does not include this information even if you do -g. There is not much gdb can do if the symbol information is not there. > > I would like to have a gdb.ini file that would allow me to attach to my > remote target without any gui interaction but I can't seem to figure it > out. Is there a way to set the baudrate from the init file? Is there a > way to specify that breakpoints should NOT be set at main() and exit()? You can set the GUI preferences (like break at main) in three ways. One is by setting up the UI the way you want and then closing the app down. This should save the preferences in the .gdbtkinit file (gdbtk.ini for the Windows folks) in your home directory. If something doesn't get saved, that is a bug. You can also edit the .gdbtkinit file by hand. You can figure out what the entries mean by looking in the sources, in particular, grep for "pref define" in the gdb/gdbtcl2 directory of the sources, this will show you what is there, and there are some comments to help you out a bit. Finally, you can run tcl code in the gdb.ini file (or from the console for that matter), using the "tk" command. Just put in: tk pref set gdb/load/main 0 for instance to turn off breaking at main. This is probably not the best way to handle startup code, however, as it will cause errors when you run gdb -nw, since the tk command only exists in GUI mode. To avoid this difficulty, you can instead pass gdb a command file through the command line using: gdb --tclcommand file.tcl which will start up Insight, and then source in the file "file.tcl". This code will be passed straight to the tcl interpreter, however, so you must leave off the "tk". You can also use this to do stuff like connect automatically when you start up. You will have to hunt around in the Tcl code to find out which Tcl procedure does what you want. The best way to do this is to find the menu item that does what you want, and seeing what its -command option is. > > We are using it as a kernel level debugger and would like to view the > supervisor level registers of the PowerPC from the View->Registers window. > Is there a magic incantation that would allow me to do this or do I have to > modify some insight code? This is a gdb internal issue, not an Insight issue. Insight just finds out all the registers that gdb knows about, and shows you those. Look at the function gdb_regnames in gdbtk-cmds.c for the details. You will have to teach gdb how to view the registers you want, then Insight will view them automatically... Hope this helps, Jim -- ++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++ Jim Ingham jingham@cygnus.com Cygnus Solutions Inc.