public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Problems with SrcWin
@ 2008-08-25  7:24 Tommy
  2008-08-25 17:23 ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Tommy @ 2008-08-25  7:24 UTC (permalink / raw)
  To: insight

Hi all,

 I'm trying to fix problems happened in a porting of Insight (version
6.7.1.) They are:

 (1) after Insight is connected to target, the Control menu and
button items are still disabled. They'll be enabled after some actions
are done (ex. execute 'stepi' from ConsoleWindow.)
     I've checked debug info from the ManagedWin's DebugWin - it
seems to call "SrcBar::enable_ui 2" in connecting but call
"SrcBar::enable_ui 1" in stepping. I know many ports of Insight didn't
patch these tcl/tk files much but leave target-dependent things in
their port C files. Do I miss something? or this should be fixed in
tcl/tk layer?

 (2) after Insight is connected to target, the SrcWin displays
nothing... (there is no 'file', 'load', and 'symbol-file' command
executed.) I think, if there is no corresponding symbolic info, it
should fetch memory contents near $PC and display disassembled
instructions.

 Thanks.

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

* Re: Problems with SrcWin
  2008-08-25  7:24 Problems with SrcWin Tommy
@ 2008-08-25 17:23 ` Keith Seitz
  2008-08-26  9:45   ` Tommy Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2008-08-25 17:23 UTC (permalink / raw)
  To: Tommy; +Cc: insight

Tommy wrote:
>  (1) after Insight is connected to target, the Control menu and
> button items are still disabled. They'll be enabled after some actions
> are done (ex. execute 'stepi' from ConsoleWindow.)

This is usually caused by inferior code not setting a fake ptid for the 
UI. This is a very common problem with non-native targets. You can check 
this by inspecting the function gdb_target_has_execution. Check out what 
  the remote target does in extended_remote_create_inferior_1 (it sets 
inferior_ptid to some made up non-NULL entity). The value does not 
matter -- that it is non-NULL is all that is required.

>  (2) after Insight is connected to target, the SrcWin displays
> nothing... (there is no 'file', 'load', and 'symbol-file' command
> executed.) I think, if there is no corresponding symbolic info, it
> should fetch memory contents near $PC and display disassembled
> instructions.

Open a console window and type "list". If gdb does not return something, 
than Insight cannot, either. Insight will disassemble around $PC *if* 
gdb can find a function containing the PC (so that it knows the bounds 
of the function to disassemble). This is a gdb limitation that Insight 
has not worked around yet (and probably never will).

Keith

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

* Re: Problems with SrcWin
  2008-08-25 17:23 ` Keith Seitz
@ 2008-08-26  9:45   ` Tommy Lin
  2008-08-26 12:08     ` Tommy Lin
                       ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tommy Lin @ 2008-08-26  9:45 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

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

* Re: Problems with SrcWin
  2008-08-26  9:45   ` Tommy Lin
@ 2008-08-26 12:08     ` Tommy Lin
  2008-08-28  1:39     ` Tommy Lin
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Tommy Lin @ 2008-08-26 12:08 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

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

* Re: Problems with SrcWin
  2008-08-26  9:45   ` Tommy Lin
  2008-08-26 12:08     ` Tommy Lin
@ 2008-08-28  1:39     ` Tommy Lin
  2008-08-28 12:57     ` Tommy Lin
  2008-09-02  9:45     ` Tommy Lin
  3 siblings, 0 replies; 7+ messages in thread
From: Tommy Lin @ 2008-08-28  1:39 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

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

* Re: Problems with SrcWin
  2008-08-26  9:45   ` Tommy Lin
  2008-08-26 12:08     ` Tommy Lin
  2008-08-28  1:39     ` Tommy Lin
@ 2008-08-28 12:57     ` Tommy Lin
  2008-09-02  9:45     ` Tommy Lin
  3 siblings, 0 replies; 7+ messages in thread
From: Tommy Lin @ 2008-08-28 12:57 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

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

* Re: Problems with SrcWin
  2008-08-26  9:45   ` Tommy Lin
                       ` (2 preceding siblings ...)
  2008-08-28 12:57     ` Tommy Lin
@ 2008-09-02  9:45     ` Tommy Lin
  3 siblings, 0 replies; 7+ messages in thread
From: Tommy Lin @ 2008-09-02  9:45 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

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

end of thread, other threads:[~2008-08-26 11:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-25  7:24 Problems with SrcWin Tommy
2008-08-25 17:23 ` Keith Seitz
2008-08-26  9:45   ` Tommy Lin
2008-08-26 12:08     ` Tommy Lin
2008-08-28  1:39     ` Tommy Lin
2008-08-28 12:57     ` Tommy Lin
2008-09-02  9:45     ` Tommy Lin

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