public inbox for
help / color / mirror / Atom feed
* Re: insight/317: Target selection problems
@ 2007-07-13 17:18 kseitz
  0 siblings, 0 replies; 2+ messages in thread
From: kseitz @ 2007-07-13 17:18 UTC (permalink / raw)
  To: hepler, insight-prs, keiths, nobody

Synopsis: Target selection problems

Responsible-Changed-From-To: unassigned->keiths
Responsible-Changed-By: kseitz
Responsible-Changed-When: Fri Jul 13 17:18:38 2007
State-Changed-From-To: open->analyzed
State-Changed-By: kseitz
State-Changed-When: Fri Jul 13 17:18:38 2007
    I'm not too sure why you got that error, but it wouldn't surprise me if there was some bitrot in this area. I don't do much embedded work anymore. The preference gdb/load/$target-portname is set in various places in targetselection.itb. It looks like the preference "default-portname" is not set, though. You might try adding something to pref_set_defaults in prefs.tcl to see if that mitigates anything.
    You are correct: in order for you to add your target to the target selection dialog, you must add a little database entry for it. It is unfortunate, but that's all we have until gdb provides something better.

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

* insight/317: Target selection problems
@ 2007-07-05  4:23 hepler
  0 siblings, 0 replies; 2+ messages in thread
From: hepler @ 2007-07-05  4:23 UTC (permalink / raw)
  To: insight-gnats

>Number:         317
>Category:       insight
>Synopsis:       Target selection problems
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 05 04:23:01 UTC 2007
>Originator:     Ed Hepler
>Release:        6.6
I have added a new target (custom jtag interface to a mips equivalent synthesizable core) to GDB.   
I have this working with GDB (using my own, modified version of remote-mips.c) in normal, text mode.  To get into the appropriate target mode, I use the command:
target vr2000
This invokes code in my modified remote-mips.c to use the
jtag interface, etc.

When I run insight, I can see that "_initialize_remote_mips" is executed and the Tk Source Window pops up.

If I select the File -> Target Settings menu item, an error occurs and I get the following stack trace:

can't read "PREFS_state(gdb/load/default-portname value)". no such element in array
  while executing
"return $PREFS_state([list $name_value])"
  (procedure "PREFS_cmd_get" line 3)
  invoked from within
"PREFS_cmd_get gdb/load/default-portname"
  ("eval" body line 1)
  invoked from within
"eval PREFS_cmd_$dispatch $args"
  (procedure "pref" line 6)
  invoked from within
"pref get gdb/load/default-portname"
  ("default" arm line 8)
  invoked from within
"switch -regexp -- $gdb_target_name {
  sim|ice {
    set targ $gdb_target_name
    set targ_opts [pref getd gdb/load/${gdb_target_name}-opts]"
  (procedure "set_target_name" line 28)
  invoked from within
  (menu invoke)errorCode is NONE

I suspect that I need to add some code to targetselection.itb to add the appropriate "vr2000" selection, but I was surprised by the error (before
I changed anything).    I looked through targetselection.itb and didn't see anywhere that the
array item gdb/load/default-portname was set (although
I did see gdb/load/default-port being set).

I also tried creating an initialization file (.gdbinit) that contains the command:
target vr2000
and I see evidence that the target is set when executing
gdb (some jtag commands are sent), but I don't see this
when executing insight.

To add my new target, is there anything else that needs to be done beyond setting the appropriate gdb_target() array items?

Is there any documentation on what must be modified within insight to add a new target? 




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

end of thread, other threads:[~2007-07-13 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13 17:18 insight/317: Target selection problems kseitz
  -- strict thread matches above, loose matches on Subject: below --
2007-07-05  4:23 hepler

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