From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Seitz To: takis@XFree86.org Cc: insight@sourceware.cygnus.com Subject: Re: [Fwd: QUESTION ON INSIGHT 5.0 (fwd)] Date: Tue, 11 Jul 2000 05:53:00 -0000 Message-id: <396B18BA.6C2E0207@firetalk.com> References: <396B139D.6760DF1E@firetalk.com> X-SW-Source: 2000-q3/msg00048.html Takis Psarogiannakopoulos wrote: > > I recenty done a port (well almost) to DG/UX unix of > gdb-5.0. This port supports threads. The target named > "dgux" (dgux_ops as child_ops for "child" in inftarg.c) > will run as default target in gdb-5.0. I build insight > 5.0 with the same files from gdb-5.0. It builds OK. > But the View->Thread list will not work! I put a trap > printf("HELLO THREADS INSIGHT\n"); > in the start of gdb/thread.c/info_thread fucntion and > nothing is coming out. So that means that it doesnt see > the target DG/UX at all. How can I add a new target? Ok, threads support in Insight is kinda lame. If threads work with gdb and you can use the "info threads" command of either the command line gdb or in Insight's console window, then threads should work. If "info threads" doesn't work, you've got other problems and I will forward your message to gdb@sourceware.cygnus.com mailing list. > The obvious "Select Target..." menu of insight doesnt > give me any choice of "dgux" target; Only some Cisco etc etc ... > However if I got out to a gdb console I can clearly see with > info targets the "dgux" target. (or use the command info threads) Now, the reason that your target doesn't show up in the target dialog is because it is a native. Linux targets don't show up, either. They all show up as "Exec". You will probably need to add your target to target_is_native () in gdb/gdbtk/generic/gdbtk.c. > I cannt see also (in Target Select) the core file! target. > How one debugs cores with insight-5.0? (if this is possible). I believe this is the same as loading a core file, isn't it? (I have never used the 'core' target...) You'll need to load the core file from the command line or the console window. From the command-line, use "gdb myprog corefile" to get Insight/gdb to load the executable "myprog" and core file "corefile". Alternatively, if Insight is already running, open a console window and enter the command "core corefile". This will update Insight to "debug" the corefile. I think it is a user interface tragedy that gdb offers the "core" target to the user, and I will never use it. Unfortunately, Insight was developed mainly with the embedded developer in mind, so it lacks quite a bit for people using native systems. Sigh. > Lastly gdb-5.0 for DG/UX has some new commands. One is > "info threads-status" that will give info for the threads in PID > related with the DG/UX kernel (sched, etc). I want to add > this new commands to insight-5.0 (when is targeted/builds for a DG/UX > system). I couldnt find any info on how to add a command , or any > automated process in insight that we can do that at runtime. > Please direct me to files that I should look and hack. You simply add your new commands to gdb in the target's tdep file. See, for example, _initialize_v850ice in v850ice.c, which adds a new command "ice" to gdb when this target is used. Keith