public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* RE: Developing for Insight
@ 2003-04-22 16:53 Liang, James
  2003-04-22 17:52 ` Keith Seitz
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-22 16:53 UTC (permalink / raw)
  To: 'Martin M. Hunt'; +Cc: 'insight@sources.redhat.com'

Actually, more than just the up and down buttons don't work.  That was just
an example.
I mean, I can't get Insight to track where I am in the code even though the
list command in the console works.

I can't get it to display assembly even though the disassemble command in
the console works.  I've been having some head-pounding fun.

-----Original Message-----
From: Martin M. Hunt [mailto:hunt@redhat.com]
Sent: Monday, April 21, 2003 5:00 PM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


On Mon, 2003-04-21 at 15:23, Liang, James wrote:

> I am adding a new target to GDB.  I set the GDBTK_DEBUG environment
variable
> to 1, but it's not quite printing the information I'm looking for.   My
> hope(maybe an unrealistic one) is that I can somehow port GDB text mode
and
> debug it completely in C and have it magically work with Insight.  

That has always been the case in my experience.  The only target
specific information in Insight is in targetselection.itb. And you
shouldn't need to do anything to it for native ports, simulators, or
standard remote targets.

> That
> way, I don't have to learn Tcl/TK or a Tcl/TK debugger to the level of
> detail that I'd probably like to fix my bugs.  The problem is that it is
> difficult to figure out bugs like the buttons for the GDB "up" and "down"
> commands to be disabled when
> the "up" and "down" commands work fine in the GDB console.

I can't imagine why only those two buttons would be disabled. So the run
button works, you can set breakpoints, step, etc?

Martin



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

* RE: Developing for Insight
  2003-04-22 16:53 Developing for Insight Liang, James
@ 2003-04-22 17:52 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 17:52 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Tue, 2003-04-22 at 09:53, Liang, James wrote:
> Actually, more than just the up and down buttons don't work.  That was just
> an example.
> I mean, I can't get Insight to track where I am in the code even though the
> list command in the console works.

Open a console window and get your target at a breakpoint somewhere
(like main). The procedure will look something like:

(gdb) file FOO
(gdb) set remotebaud XXXX [if necessary]
(gdb) target BLAH [if necessary]
(gdb) load [if necessary]
(gdb) break SOMEWHERE
(gdb) [run or continue]

Now type:

(gdb) f
(gdb) list
(gdb) tk gdb_loc

Send the results of these last three commands to the list. This is just
too goofy.

Keith


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

* RE: Developing for Insight
       [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792016@es07snlnt.sandia.gov>
@ 2003-04-22 23:15 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 23:15 UTC (permalink / raw)
  To: Liang, James; +Cc: insight

On Tue, 2003-04-22 at 15:41, Liang, James wrote:
> Ok... I set the flags in my routine, now tk gdb_target_has_execution returns
> 1
> .  How do I set the gdb_running flag?

Insight should set that automatically using gdb_target_has_execution.
Does it still not work? (You can do "tk set ::gdb_running" when you're
stopped at a breakpoint. It should be "1" when your target is active.)

Keith


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

* RE: Developing for Insight
  2003-04-22 21:45 ` Keith Seitz
@ 2003-04-22 21:47   ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 21:47 UTC (permalink / raw)
  To: Liang, James; +Cc: insight

On Tue, 2003-04-22 at 14:47, Keith Seitz wrote:

> You need to have a ptid set and target_has_execution must be set. Goofy,

Ahem... Gdb internals will set target_has_execution. You just need to
make sure that inferior_ptid gets set.

Keith


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

* RE: Developing for Insight
       [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792015@es07snlnt.sandia.gov>
@ 2003-04-22 21:45 ` Keith Seitz
  2003-04-22 21:47   ` Keith Seitz
  0 siblings, 1 reply; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 21:45 UTC (permalink / raw)
  To: Liang, James; +Cc: insight

On Tue, 2003-04-22 at 14:34, Liang, James wrote:
> I know it hits gdbtk_tcl_idle because I saw function calls with
> gdbtk_tcl_idle being sent to the Tcl/TK interpreter C code.
> 
> the "tk gdb_target_has_execution" returns 0

That could be a problem. Insight doesn't think that you have an
inferior. I presume that doing "tk set ::gdb_running" returns 0 as well.

> How do I access that flag in C code?

You need to have a ptid set and target_has_execution must be set. Goofy,
but that's what gdb does. Here's the function from
gdbtk/generic/gdbtk-cmds.c:

static int
gdb_target_has_execution_command (ClientData clientData, Tcl_Interp
*interp,
                                  int objc, Tcl_Obj *CONST objv[])
{
  int result = 0;

  if (target_has_execution && ! ptid_equal (inferior_ptid, null_ptid))
    result = 1;

  Tcl_SetBooleanObj (result_ptr->obj_ptr, result);
  return TCL_OK;
}

Normally, target's will set inferior_ptid in their "create_inferior"
target method. When there is no such thing as a pid/tid, we make one up.
remote-sim.c, for example, does this:

	inferior_ptid = pid_to_ptid (42);

Keith


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

* RE: Developing for Insight
       [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792014@es07snlnt.sandia.gov>
@ 2003-04-22 21:18 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 21:18 UTC (permalink / raw)
  To: Liang, James; +Cc: insight

On Tue, 2003-04-22 at 14:10, Liang, James wrote:
> Yes.. the tk gdbtk_update did it.  Hm.. I must have accidentally clobbered
> whatever normally calls that.

There could be another reason: Insight may not think you have an
inferior or something. When you run, does it ever hit gdbtk_tcl_idle in
gdb/gdbtk/library/interface.tcl? (Insert something like 'puts stdout
"here i am"' or 'dbug I "here i am"' into gdbtk_tcl_idle.)

What does "tk gdb_target_has_execution" output when you're stopped?

Keith


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

* RE: Developing for Insight
  2003-04-22 20:39 Liang, James
@ 2003-04-22 20:58 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 20:58 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Tue, 2003-04-22 at 13:39, Liang, James wrote:
> I'm assuming that red is error, yellow is warning, and green is status
> message.  I barely know Tcl/TK and
> don't know anything about Tcl/TK with OO, but I don't see any blaring error
> messages.

Yes, that's correct. They are also prefixed with "I" (informational),
"W" (warning), and "E" (error). I don't see any errors, either. What is
more interesting, though, is that I do NOT see something that should be
there...

Do me a favor. When you run Insight, open a debug window, load your
application, but do NOT run it. Clear the Debug window's output (it's in
one of the menus), and then click "Run" (or do whatever to get to a
breakpoint at main()). Then copy the log and send it to the list. That
will get rid of a lot of the "noise".

Here's something to try, just for giggles: when you're at your
breakpoint, type "tk gdbtk_update". Did anything happen?

Keith


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

* RE: Developing for Insight
@ 2003-04-22 20:52 Liang, James
  0 siblings, 0 replies; 17+ messages in thread
From: Liang, James @ 2003-04-22 20:52 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: 'insight@sources.redhat.com'

Something else I forgot to mention that may clear things up.

Recall I said the source window is stack on main.c at function main.  Well,
if I hit the
stack button, it will show me my call stack.  If I click on one of the
functions in the call stack, it has no trouble updating the code window to
match.  Funny.  disassembly still doesn't work though


-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Tuesday, April 22, 2003 12:46 PM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


On Tue, 2003-04-22 at 11:18, Liang, James wrote:

> (gdb) f
> #0  func2 () at test.c:79
> 
> (gdb) list
> 74         doPrint("Hello\n");
> 75     #endif
> 76         INT8U      y;
> 77
> 78         if (0==retVal)
> 79           retVal=pparse(retVal,a,b);
> 80         else 
> 81           return retVal;
> 82         
> 83         /* function got
> 
> (gdb) tk gdb_loc
> test.c func2 /home/jliang/testProg/test.c 79 0x33d45 0x0 {}

Ok, so what we see is that both Insight and GDB think you're at the same
place, in func2() at /home/jliang/testProg/test.c:79. So the SrcWin or
SrcTextWin is screwing up. Are you sure that the debug window reported
no errors? Perhaps it would be best to send your insight.log for the
session?

[Reming me again: what codebase are you working with? Host platform?]

Keith



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

* RE: Developing for Insight
@ 2003-04-22 20:39 Liang, James
  2003-04-22 20:58 ` Keith Seitz
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-22 20:39 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: 'insight@sources.redhat.com'

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

Keith,

I'm assuming that red is error, yellow is warning, and green is status
message.  I barely know Tcl/TK and
don't know anything about Tcl/TK with OO, but I don't see any blaring error
messages.

James

PS: See attached log file
-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Tuesday, April 22, 2003 12:46 PM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


On Tue, 2003-04-22 at 11:18, Liang, James wrote:

> (gdb) f
> #0  func2 () at test.c:79
> 
> (gdb) list
> 74         doPrint("Hello\n");
> 75     #endif
> 76         INT8U      y;
> 77
> 78         if (0==retVal)
> 79           retVal=pparse(retVal,a,b);
> 80         else 
> 81           return retVal;
> 82         
> 83         /* function got
> 
> (gdb) tk gdb_loc
> test.c func2 /home/jliang/testProg/test.c 79 0x33d45 0x0 {}

Ok, so what we see is that both Insight and GDB think you're at the same
place, in func2() at /home/jliang/testProg/test.c:79. So the SrcWin or
SrcTextWin is screwing up. Are you sure that the debug window reported
no errors? Perhaps it would be best to send your insight.log for the
session?

[Reming me again: what codebase are you working with? Host platform?]

Keith




[-- Attachment #2: insight.log --]
[-- Type: application/octet-stream, Size: 11888 bytes --]

W global pref_read {Cannot parse line: 	editor=}
I global pref_set_colors {}
I global gdbtk_clear_file {}
I ManagedWin find SrcWin
I global gdbtk_locate_main {Searching MAIN___ MAIN__ main}
I SrcWin point_to_main {could not find main}
I ManagedWin startup {Got active list {ManagedWin::open Console} {ManagedWin::open WatchWin} {ManagedWin::open SrcWin} {ManagedWin::open LocalsWin}}
I ManagedWin _open {Console }
I ManagedWin _create {win=console args=}
I EmbeddedWin constructor {}
I Console constructor {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.console0.console"}
I ManagedWin _open {WatchWin }
I ManagedWin _create {win=watchwin args=}
I GDBWin constructor {}
I EmbeddedWin constructor {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.watchwin0.watchwin"}
I VariableWin build_win tree=.watchwin0.watchwin.f.top.tree
I WatchWin update {START WATCH UPDATE CALLBACK}
I VariableWin populate {}
I VariableWin populate variables=
I VariableWin populate {done with populate}
I VariableWin update {}
I WatchWin update {Did VariableWin::update with return ""}
I WatchWin update {END WATCH UPDATE CALLBACK}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.watchwin0.watchwin"}
I ManagedWin _open {SrcWin }
I ManagedWin _create {win=srcwin args=}
I GDBWin constructor {}
I TopLevelWin constructor .srcwin0.srcwin
I SrcWin constructor {}
I SrcBar create_plugin_menu {No plugins configured, go remove the PlugIn menu...}
I SrcBar _set_runstop normal
I SrcBar enable_ui {2 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I GDBToolBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I SrcBar {} {configuring runstop normal}
I SrcBar _set_runstop normal
I GDBWin constructor {}
I global gdbtk_locate_main {Searching MAIN___ MAIN__ main}
I SrcWin location {running=0 tag=BROWSE_TAG linespec=main.c main /home/jliang/flat16/main.c 86 0x228f 0x0 {}}
I SrcWin location {not running: name=/home/jliang/flat16/main.c funcname=main line=86}
I SrcTextWin _mtime_changed {no mtime. resetting to zero}
I SrcTextWin LoadFile {/home/jliang/flat16/main.c  SOURCE}
I SrcTextWin LoadFromCache {LoadFromCache t /home/jliang/flat16/main.c S}
I SrcTextWin LoadFromCache name=/home/jliang/flat16/main.c
I SrcTextWin LoadFromCache pane=pane1
I SrcTextWin LoadFile {READING /home/jliang/flat16/main.c}
I ManagedWin _open {LocalsWin }
I ManagedWin _create {win=localswin args=}
I GDBWin constructor {}
I EmbeddedWin constructor {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin.container.pane2.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin.container.pane0.childsite.con"}
I SrcBar enable_ui {0 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Other disabled  Trace disabled  Attach disabled  Detach disabled}
I GDBToolBar set_class_state {Enable list is: Control disabled  Other disabled  Trace disabled  Attach disabled  Detach disabled}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.watchwin0.watchwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin"}
I SrcBar {} {configuring runstop running}
I SrcBar _set_runstop running
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.localswin0.localswin"}
I VariableWin build_win tree=.localswin0.localswin.f.tree
I LocalsWin update {START LOCALS UPDATE CALLBACK}
I VariableWin context_switch {1: err=0; _frame=""; current_frame=""}
I VariableWin context_switch 2
I VariableWin update {}
I LocalsWin update {END LOCALS UPDATE CALLBACK}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin.container.pane2.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin.container.pane0.childsite.con"}
I SrcBar enable_ui {1 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Trace disabled  Control normal  Other normal  Attach disabled  Detach normal }
I GDBToolBar set_class_state {Enable list is: Trace disabled  Control normal  Other normal  Attach disabled  Detach normal }
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.watchwin0.watchwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin"}
I SrcBar {} {configuring runstop normal}
I SrcBar _set_runstop normal
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.localswin0.localswin"}
I VariableWin deleteTree {}
I SrcBar enable_ui {2 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I GDBToolBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I LocalsWin update {START LOCALS UPDATE CALLBACK}
I VariableWin context_switch {1: err=0; _frame=""; current_frame=""}
I VariableWin context_switch 2
I VariableWin update {}
I LocalsWin update {END LOCALS UPDATE CALLBACK}
I ManagedWin find SrcWin
I Session notice_file_change {noticed file change event for /home/jliang/insight-5.3/gdb/uCos.gdb}
I Session notice_file_change {reloading session for /home/jliang/insight-5.3/gdb/uCos.gdb}
I Session notice_file_change {Restoring Target: }
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.srcwin0.srcwin.container.pane2.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.srcwin0.srcwin.container.pane0.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.watchwin0.watchwin"}
I WatchWin update {START WATCH UPDATE CALLBACK}
I VariableWin populate {}
I VariableWin populate variables=
I VariableWin populate {done with populate}
I VariableWin update {}
I WatchWin update {Did VariableWin::update with return ""}
I WatchWin update {END WATCH UPDATE CALLBACK}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.srcwin0.srcwin"}
I SrcWin choose_and_update {chose window ::.srcwin0.srcwin}
I SrcWin _update {loc={} {} {} 0 0x0 0x0 {}}
I SrcWin location {running=0 tag= linespec={} {} {} 0 0x0 0x0 {}}
I SrcWin location {not running: name= funcname= line=0}
I global gdbtk_locate_main {Searching MAIN___ MAIN__ main}
I SrcWin location {new linespec=main.c main /home/jliang/flat16/main.c 86 0x228f 0x0 {}}
I GDBEventHandler GDBEventHandler::dispatch {posting event "update" to "::.localswin0.localswin"}
I LocalsWin update {START LOCALS UPDATE CALLBACK}
I VariableWin context_switch {1: err=0; _frame=""; current_frame=""}
I VariableWin context_switch 2
I VariableWin update {}
I LocalsWin update {END LOCALS UPDATE CALLBACK}
I ManagedWin _open {DebugWin }
I ManagedWin _create {win=debugwin args=}
I DebugWin constructor {}
I global gdbtk_clear_file {}
I VariableWin deleteTree {}
I SrcTextWin clear_file {In clear_file}
I iwidgets::Labeledframe destructor {In Labeledframe destructor for ::.srcwin0.srcwin.container.pane2.childsite.con.p.pane1.childsite.st, reposition is }
I VariableWin deleteTree {}
I SrcWin _name {.srcwin0.srcwin.container.pane1.childsite.con.name }
I SrcWin _set_state {gdb_running l=0 d=0 r=0}
I SrcWin _set_state {gdb_downloading l=0 d=0 r=0}
I SrcWin _set_state {gdb_loaded l=0 d=0 r=0}
I SrcWin _set_state {gdb_running l=0 d=0 r=0}
I ManagedWin find SrcWin
I global gdbtk_locate_main {Searching MAIN___ MAIN__ main}
I SrcWin location {running=0 tag=BROWSE_TAG linespec={main.c main /home/jliang/flat16/main.c 86 0x31bdc 0x0 {}}}
I SrcWin location {not running: name= funcname= line=}
I global gdbtk_locate_main {Searching MAIN___ MAIN__ main}
I SrcWin location {new linespec=main.c main /home/jliang/flat16/main.c 86 0x31bdc 0x0 {}}
I SrcTextWin LoadFile {/home/jliang/flat16/main.c  SOURCE}
I SrcTextWin LoadFromCache {LoadFromCache t /home/jliang/flat16/main.c S}
I SrcTextWin LoadFromCache name=/home/jliang/flat16/main.c
I SrcTextWin LoadFromCache pane=pane1
I SrcTextWin LoadFile {READING /home/jliang/flat16/main.c}
I ManagedWin _open {RegWin }
I ManagedWin _create {win=regwin args=}
I GDBWin constructor {}
I EmbeddedWin constructor {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin.container.pane2.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin.container.pane0.childsite.con"}
I SrcBar enable_ui {0 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Other disabled  Trace disabled  Attach disabled  Detach disabled}
I GDBToolBar set_class_state {Enable list is: Control disabled  Other disabled  Trace disabled  Attach disabled  Detach disabled}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.watchwin0.watchwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.srcwin0.srcwin"}
I SrcBar {} {configuring runstop running}
I SrcBar _set_runstop running
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.regwin0.regwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "busy" to "::.localswin0.localswin"}
I RegWin _layout_table {}
I RegWin _load_prefs {}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin.container.pane2.childsite.con"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.console0.console"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin.container.pane0.childsite.con"}
I SrcBar enable_ui {1 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Trace disabled  Control normal  Other normal  Attach disabled  Detach normal }
I GDBToolBar set_class_state {Enable list is: Trace disabled  Control normal  Other normal  Attach disabled  Detach normal }
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.watchwin0.watchwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.srcwin0.srcwin"}
I SrcBar {} {configuring runstop normal}
I SrcBar _set_runstop normal
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.regwin0.regwin"}
I GDBEventHandler GDBEventHandler::dispatch {posting event "idle" to "::.localswin0.localswin"}
I VariableWin deleteTree {}
I SrcBar enable_ui {2 - Browsing=0}
I GDBMenuBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I GDBToolBar set_class_state {Enable list is: Control disabled  Trace disabled  Other normal  Attach normal  Detach disabled }
I VariableWin deleteTree {}
I RegWin destructor {}
I EmbeddedWin destructor {}
I GDBWin destructor {}
I SrcWin _exit {}
I ManagedWin find SrcWin
I SrcWin destructor {}
I TopLevelWin destructor {}
I global pref_save {pref_save e:/cygwin/home/jliang/gdbtk.ini}
I iwidgets::Labeledframe destructor {In Labeledframe destructor for ::.console0.console.stext, reposition is }
I EmbeddedWin destructor {}

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

* RE: Developing for Insight
  2003-04-22 18:37 Liang, James
@ 2003-04-22 18:45 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 18:45 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Tue, 2003-04-22 at 11:37, Liang, James wrote:
> To clarify, the only thing that Insight displays in the code Window is the
> very first executable line of my
> main function in main.c

Hmm. Wow, am I confused. Can you send a picture of the source window at
this point (i.e., while stopped at func2())?

Keith


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

* RE: Developing for Insight
  2003-04-22 18:18 Liang, James
@ 2003-04-22 18:43 ` Keith Seitz
  0 siblings, 0 replies; 17+ messages in thread
From: Keith Seitz @ 2003-04-22 18:43 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Tue, 2003-04-22 at 11:18, Liang, James wrote:

> (gdb) f
> #0  func2 () at test.c:79
> 
> (gdb) list
> 74         doPrint("Hello\n");
> 75     #endif
> 76         INT8U      y;
> 77
> 78         if (0==retVal)
> 79           retVal=pparse(retVal,a,b);
> 80         else 
> 81           return retVal;
> 82         
> 83         /* function got
> 
> (gdb) tk gdb_loc
> test.c func2 /home/jliang/testProg/test.c 79 0x33d45 0x0 {}

Ok, so what we see is that both Insight and GDB think you're at the same
place, in func2() at /home/jliang/testProg/test.c:79. So the SrcWin or
SrcTextWin is screwing up. Are you sure that the debug window reported
no errors? Perhaps it would be best to send your insight.log for the
session?

[Reming me again: what codebase are you working with? Host platform?]

Keith


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

* RE: Developing for Insight
@ 2003-04-22 18:37 Liang, James
  2003-04-22 18:45 ` Keith Seitz
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-22 18:37 UTC (permalink / raw)
  To: 'insight@sources.redhat.com'

To clarify, the only thing that Insight displays in the code Window is the
very first executable line of my
main function in main.c


-----Original Message-----
From: Liang, James 
Sent: Tuesday, April 22, 2003 12:18 PM
To: 'Keith Seitz'
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


Ok... 

-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Tuesday, April 22, 2003 11:54 AM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


On Tue, 2003-04-22 at 09:53, Liang, James wrote:
> Actually, more than just the up and down buttons don't work.  That was
just
> an example.
> I mean, I can't get Insight to track where I am in the code even though
the
> list command in the console works.

Open a console window and get your target at a breakpoint somewhere
(like main). The procedure will look something like:

(gdb) file FOO
(gdb) set remotebaud XXXX [if necessary]
(gdb) target BLAH [if necessary]
(gdb) load [if necessary]
(gdb) break SOMEWHERE
(gdb) [run or continue]

Now type:

(gdb) f
(gdb) list
(gdb) tk gdb_loc

Send the results of these last three commands to the list. This is just
too goofy.

Keith



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

* RE: Developing for Insight
@ 2003-04-22 18:18 Liang, James
  2003-04-22 18:43 ` Keith Seitz
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-22 18:18 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: 'insight@sources.redhat.com'

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Ok... 

-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Tuesday, April 22, 2003 11:54 AM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: RE: Developing for Insight


On Tue, 2003-04-22 at 09:53, Liang, James wrote:
> Actually, more than just the up and down buttons don't work.  That was
just
> an example.
> I mean, I can't get Insight to track where I am in the code even though
the
> list command in the console works.

Open a console window and get your target at a breakpoint somewhere
(like main). The procedure will look something like:

(gdb) file FOO
(gdb) set remotebaud XXXX [if necessary]
(gdb) target BLAH [if necessary]
(gdb) load [if necessary]
(gdb) break SOMEWHERE
(gdb) [run or continue]

Now type:

(gdb) f
(gdb) list
(gdb) tk gdb_loc

Send the results of these last three commands to the list. This is just
too goofy.

Keith




[-- Attachment #2: share.txt --]
[-- Type: text/plain, Size: 362 bytes --]

(gdb) f
#0  func2 () at test.c:79

(gdb) list
74         doPrint("Hello\n");
75     #endif
76         INT8U      y;
77
78         if (0==retVal)
79           retVal=pparse(retVal,a,b);
80         else 
81           return retVal;
82         
83         /* function got

(gdb) tk gdb_loc
test.c func2 /home/jliang/testProg/test.c 79 0x33d45 0x0 {}

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

* RE: Developing for Insight
  2003-04-21 22:23 Liang, James
@ 2003-04-21 22:59 ` Martin M. Hunt
  0 siblings, 0 replies; 17+ messages in thread
From: Martin M. Hunt @ 2003-04-21 22:59 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Mon, 2003-04-21 at 15:23, Liang, James wrote:

> I am adding a new target to GDB.  I set the GDBTK_DEBUG environment variable
> to 1, but it's not quite printing the information I'm looking for.   My
> hope(maybe an unrealistic one) is that I can somehow port GDB text mode and
> debug it completely in C and have it magically work with Insight.  

That has always been the case in my experience.  The only target
specific information in Insight is in targetselection.itb. And you
shouldn't need to do anything to it for native ports, simulators, or
standard remote targets.

> That
> way, I don't have to learn Tcl/TK or a Tcl/TK debugger to the level of
> detail that I'd probably like to fix my bugs.  The problem is that it is
> difficult to figure out bugs like the buttons for the GDB "up" and "down"
> commands to be disabled when
> the "up" and "down" commands work fine in the GDB console.

I can't imagine why only those two buttons would be disabled. So the run
button works, you can set breakpoints, step, etc?

Martin


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

* RE: Developing for Insight
@ 2003-04-21 22:23 Liang, James
  2003-04-21 22:59 ` Martin M. Hunt
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-21 22:23 UTC (permalink / raw)
  To: 'Martin M. Hunt'; +Cc: 'insight@sources.redhat.com'

Martin,


I'm starting from Insight 5.3 that I downloaded from the Redhat website.

I am adding a new target to GDB.  I set the GDBTK_DEBUG environment variable
to 1, but it's not quite printing the information I'm looking for.   My
hope(maybe an unrealistic one) is that I can somehow port GDB text mode and
debug it completely in C and have it magically work with Insight.   That
way, I don't have to learn Tcl/TK or a Tcl/TK debugger to the level of
detail that I'd probably like to fix my bugs.  The problem is that it is
difficult to figure out bugs like the buttons for the GDB "up" and "down"
commands to be disabled when
the "up" and "down" commands work fine in the GDB console.

Oh well.

James

-----Original Message-----
From: Martin M. Hunt [mailto:hunt@redhat.com]
Sent: Thursday, April 10, 2003 2:05 PM
To: Liang, James
Cc: 'insight@sources.redhat.com'
Subject: Re: Developing for Insight


On Thu, 2003-04-10 at 12:46, Liang, James wrote:
> Hello.  I am porting GDB and would like to make the port work with
Insight.
> I had hoped to 
> just get a the text version to work without having the work on Insight,
but
> this is quickly becoming
> infeasible.   

By "port" do you mean you are adding a new target to GDB?  Or are you
porting it to a new host OS? Or both?

Which sources are you starting from?

> I'm only a few days into it, and I already have a case where the text
> version of GDB knows where I am 
> (when I hit the where button, it shows the source files and line numbers),
> but the graphical version won't bring
> this info up in the window.

You should have gdb/gdbtk/library/help/debug.html.  Take a look at
that.  Set the environment variable "GDBTK_DEBUG" before running insight
then look for errors in the debug window.  Add debug statements into the
tcl source as necessary.

See gdb/gdbtk/README for more information.

> What development environment did you guys use to debug the tcl code for
> Insight?  

Just the internal debug window.  It can trace or display the output of tcl
debug statements.

>Is there a spec that tells which
> bits of Insight functionality depend on which data structures or which
text
> GDB command?

Nothing more than the README file and inline comments.

Martin



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

* Re: Developing for Insight
  2003-04-10 19:47 Liang, James
@ 2003-04-10 20:05 ` Martin M. Hunt
  0 siblings, 0 replies; 17+ messages in thread
From: Martin M. Hunt @ 2003-04-10 20:05 UTC (permalink / raw)
  To: Liang, James; +Cc: 'insight@sources.redhat.com'

On Thu, 2003-04-10 at 12:46, Liang, James wrote:
> Hello.  I am porting GDB and would like to make the port work with Insight.
> I had hoped to 
> just get a the text version to work without having the work on Insight, but
> this is quickly becoming
> infeasible.   

By "port" do you mean you are adding a new target to GDB?  Or are you
porting it to a new host OS? Or both?

Which sources are you starting from?

> I'm only a few days into it, and I already have a case where the text
> version of GDB knows where I am 
> (when I hit the where button, it shows the source files and line numbers),
> but the graphical version won't bring
> this info up in the window.

You should have gdb/gdbtk/library/help/debug.html.  Take a look at
that.  Set the environment variable "GDBTK_DEBUG" before running insight
then look for errors in the debug window.  Add debug statements into the
tcl source as necessary.

See gdb/gdbtk/README for more information.

> What development environment did you guys use to debug the tcl code for
> Insight?  

Just the internal debug window.  It can trace or display the output of tcl debug statements.

>Is there a spec that tells which
> bits of Insight functionality depend on which data structures or which text
> GDB command?

Nothing more than the README file and inline comments.

Martin


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

* Developing for Insight
@ 2003-04-10 19:47 Liang, James
  2003-04-10 20:05 ` Martin M. Hunt
  0 siblings, 1 reply; 17+ messages in thread
From: Liang, James @ 2003-04-10 19:47 UTC (permalink / raw)
  To: 'insight@sources.redhat.com'

Hello.  I am porting GDB and would like to make the port work with Insight.
I had hoped to 
just get a the text version to work without having the work on Insight, but
this is quickly becoming
infeasible.   

I'm only a few days into it, and I already have a case where the text
version of GDB knows where I am 
(when I hit the where button, it shows the source files and line numbers),
but the graphical version won't bring
this info up in the window.

What development environment did you guys use to debug the tcl code for
Insight?  Is there a spec that tells which
bits of Insight functionality depend on which data structures or which text
GDB command?

James Z. Liang
Dept 5931
Sandia National Laboratories
505-284-9933
jliang@sandia.gov



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

end of thread, other threads:[~2003-04-22 23:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 16:53 Developing for Insight Liang, James
2003-04-22 17:52 ` Keith Seitz
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792016@es07snlnt.sandia.gov>
2003-04-22 23:15 ` Keith Seitz
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792015@es07snlnt.sandia.gov>
2003-04-22 21:45 ` Keith Seitz
2003-04-22 21:47   ` Keith Seitz
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792014@es07snlnt.sandia.gov>
2003-04-22 21:18 ` Keith Seitz
  -- strict thread matches above, loose matches on Subject: below --
2003-04-22 20:52 Liang, James
2003-04-22 20:39 Liang, James
2003-04-22 20:58 ` Keith Seitz
2003-04-22 18:37 Liang, James
2003-04-22 18:45 ` Keith Seitz
2003-04-22 18:18 Liang, James
2003-04-22 18:43 ` Keith Seitz
2003-04-21 22:23 Liang, James
2003-04-21 22:59 ` Martin M. Hunt
2003-04-10 19:47 Liang, James
2003-04-10 20:05 ` Martin M. Hunt

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