* Adding a target?
@ 2008-02-26 3:07 Edward L. Hepler
2008-02-26 18:13 ` Dave Korn
2008-02-29 5:38 ` Keith Seitz
0 siblings, 2 replies; 6+ messages in thread
From: Edward L. Hepler @ 2008-02-26 3:07 UTC (permalink / raw)
To: insight
Thanks for a very nice tool.
I have developed a synthesizable embedded controller based on the MIPS
r2000 instruction set. It includes a JTAG port that interfaces to
logic in the core that permits debugging (via observability and
controllability of registers, memory, etc.).
I have modified GDB by adding a new target (as part of remote-mips.c) to
accomodate the JTAG port (and also allow GDB to act as a front-end to
drive the VHDL RTL model embedded in a design simulating in Modelsim).
I'd like to use insight to drive gdb and have included the appropriate
gdb modifications. The "gdb-side" appears to operate properly, but
I'm still having some problems with the GUI portion. I'd appreciate
any pointers you may be able to send that would help in adding a target
to the GUI... An error pops up stating that "can't read
"PREFS_state(gdb/load/default-portname value)" no such element in array"
I do have experience in writing Tcl/Tk applications, so some general
pointers may be enough...
Many thanks,
Ed Hepler
P.S. I'm using insight-6.6 (I downloaded insight-6.7.1, but "configure"
failed due to syntax errors (lines 11 and 19)... Haven't had time to
look into this...). I'm also running all of this under Cygwin
on a PC running Windows XP pro...
----------------------------------------------------------------------------
VLSI Concepts offers synthesizable processor cores for embedded control
applications... See our standard products and ask about customization...
----------------------------------------------------------------------------
Dr. Edward L. Hepler
President, Adjunct Professor,
VLSI Concepts, Inc. Villanova University Graduate Courses:
VLSI and System ECE-8440 System Design and Modeling
Architecture, Design, ECE-8445 Advanced Computer Architecture
and CAD ECE-8460 VLSI Design
email: hepler@vlsi-concepts.com or elh@ece.villanova.edu
mobile: (484) 459-1126
www: http://www.vlsi-concepts.com Read: I Cor 8:6
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Adding a target?
2008-02-26 3:07 Adding a target? Edward L. Hepler
@ 2008-02-26 18:13 ` Dave Korn
2008-03-06 3:31 ` Edward L. Hepler
2008-02-29 5:38 ` Keith Seitz
1 sibling, 1 reply; 6+ messages in thread
From: Dave Korn @ 2008-02-26 18:13 UTC (permalink / raw)
To: 'Edward L. Hepler', insight
On 26 February 2008 03:07, Edward L. Hepler wrote:
> P.S. I'm using insight-6.6 (I downloaded insight-6.7.1, but "configure"
> failed due to syntax errors (lines 11 and 19)... Haven't had time to
> look into this...). I'm also running all of this under Cygwin
> on a PC running Windows XP pro...
You know, looking at the configure script, I /really/ don't think there
should be a syntax error on line 11 ....
/gnu/insight-6.7.1 $ cat -n configure | head -14 | tail -6
9 ## M4sh Initialization. ##
10 ## --------------------- ##
11
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
Heh. This is a cygwin-specific thing: Don't use WinZIP or WinRAR or any
other gui application to unpack tarballs, because they mangle the line endings
into windows-style CRLF, which bash doesn't understand. Use command-line tar
instead:
"tar xvjf <tarball name>.tar.bz2"
or
"tar xvzf <tarball name>.tar.gz2"
according to the type.
cheers,
DaveK
--
Can't think of a witty .sigline today....
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding a target?
2008-02-26 3:07 Adding a target? Edward L. Hepler
2008-02-26 18:13 ` Dave Korn
@ 2008-02-29 5:38 ` Keith Seitz
[not found] ` <Pine.GSO.4.62.0803081507200.8750@manx.misty.com>
1 sibling, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2008-02-29 5:38 UTC (permalink / raw)
To: Edward L. Hepler; +Cc: insight
Edward L. Hepler wrote:
> I'd like to use insight to drive gdb and have included the appropriate
> gdb modifications. The "gdb-side" appears to operate properly, but
> I'm still having some problems with the GUI portion. I'd appreciate
> any pointers you may be able to send that would help in adding a target
> to the GUI... An error pops up stating that "can't read
> "PREFS_state(gdb/load/default-portname value)" no such element in array"
There are two preferences that are rather closely related, "*-port" and
"*-portname". The former is used with serial connections and the latter
with TCP connections. In this latter case, the TCP port NUMBER is stored
in *-portname (I don't know why!). [YUCK!]
The "default" target settings are supposed to be initialized by
TargetSelection::_init_prefs, which is initialized when the target
selection dialog is CONSTRUCTED. Sigh. That's messed up, since
interface.tcl relies on these values in set_target_name. Yich. I'm
surprised this worked at all.
Alas, as a quick hack, try this:
1) add a call to _init_prefs in either TargetSelection::getname or
TargetSelection::init_target_db. I would probably do it in
init_target_db and remove other calls to _init_pref in this file.
2) define the preference gdb/load/default-portname (set it to any
integer) in TargetSelection::_init_prefs (follow the example for
default-port at the end of this method).
Let me know if that fixes your problem.
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Adding a target?
2008-02-26 18:13 ` Dave Korn
@ 2008-03-06 3:31 ` Edward L. Hepler
0 siblings, 0 replies; 6+ messages in thread
From: Edward L. Hepler @ 2008-03-06 3:31 UTC (permalink / raw)
To: Dave Korn; +Cc: insight
That was it... I should have thought of that!
Thanks...
Ed Hepler
----------------------------------------------------------------------------
VLSI Concepts offers synthesizable processor cores for embedded control
applications... See our standard products and ask about customization...
----------------------------------------------------------------------------
Dr. Edward L. Hepler
President, Adjunct Professor,
VLSI Concepts, Inc. Villanova University Graduate Courses:
VLSI and System ECE-8440 System Design and Modeling
Architecture, Design, ECE-8445 Advanced Computer Architecture
and CAD ECE-8460 VLSI Design
email: hepler@vlsi-concepts.com or elh@ece.villanova.edu
mobile: (484) 459-1126
www: http://www.vlsi-concepts.com Read: I Cor 8:6
On Tue, 26 Feb 2008, Dave Korn wrote:
> On 26 February 2008 03:07, Edward L. Hepler wrote:
>
>> P.S. I'm using insight-6.6 (I downloaded insight-6.7.1, but "configure"
>> failed due to syntax errors (lines 11 and 19)... Haven't had time to
>> look into this...). I'm also running all of this under Cygwin
>> on a PC running Windows XP pro...
>
> You know, looking at the configure script, I /really/ don't think there
> should be a syntax error on line 11 ....
>
> /gnu/insight-6.7.1 $ cat -n configure | head -14 | tail -6
> 9 ## M4sh Initialization. ##
> 10 ## --------------------- ##
> 11
> 12 # Be Bourne compatible
> 13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
> 14 emulate sh
>
>
> Heh. This is a cygwin-specific thing: Don't use WinZIP or WinRAR or any
> other gui application to unpack tarballs, because they mangle the line endings
> into windows-style CRLF, which bash doesn't understand. Use command-line tar
> instead:
>
> "tar xvjf <tarball name>.tar.bz2"
>
> or
>
> "tar xvzf <tarball name>.tar.gz2"
>
> according to the type.
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding a target?
[not found] ` <Pine.GSO.4.62.0803081507200.8750@manx.misty.com>
@ 2008-03-09 17:34 ` Edward L. Hepler
2008-03-09 23:49 ` Keith Seitz
0 siblings, 1 reply; 6+ messages in thread
From: Edward L. Hepler @ 2008-03-09 17:34 UTC (permalink / raw)
To: Keith Seitz; +Cc: insight
Keith,
I'm still trying to move up from gdb-6.5 (and insight-6.6) to
insight-6.7.1
I have gotten past the GUI problem I had thanks to your earlier
suggestion.
I am having a problem inserting a breakpoint... This worked fine using
gdb-6.5 and insight-6.6, but seems to have broken with insight-6.6.
It appears that the "to_insert_breakpoint" function is not getting called.
I have "watched" the "current_target" structure and see the entries for
my target (vr2000) get inserted into the structure after typing the "run"
command. (The old values were for the "exec" target... new values for
the "vr2000" target.) What is unusual is that the "to_insert_breakpoint"
structure member is not being set to the vr2000 value. The "ignore"
function is instead being inserted. Later, when the breakpoint should
be being inserted, the "ignore" function is called (instead of the
function defined for vr2000 (which substitutes the "break" instruction
for the instruction in the target memory). This worked in earlier
versions...
Do you know of changes that might have caused this to break?
Is there some reason why the "to_insert_breakpoint" structure item
would not be overloaded with the vr2000 entry when the ops target
is changed?
Any thoughts would be appreciated...
Thanks,
Ed Hepler
----------------------------------------------------------------------------
VLSI Concepts offers synthesizable processor cores for embedded control
applications... See our standard products and ask about customization...
----------------------------------------------------------------------------
Dr. Edward L. Hepler
President, Adjunct Professor,
VLSI Concepts, Inc. Villanova University Graduate Courses:
VLSI and System ECE-8440 System Design and Modeling
Architecture, Design, ECE-8445 Advanced Computer Architecture
and CAD ECE-8460 VLSI Design
email: hepler@vlsi-concepts.com or elh@ece.villanova.edu
mobile: (484) 459-1126
www: http://www.vlsi-concepts.com Read: I Cor 8:6
On Sat, 8 Mar 2008, Edward L. Hepler wrote:
>
> Keith,
>
> That seemed to do it... Many thanks...
>
> By the way, where is the function "code" defined?
>
> Thanks again,
>
> Ed Hepler
>
> ----------------------------------------------------------------------------
> VLSI Concepts offers synthesizable processor cores for embedded control
> applications... See our standard products and ask about customization...
> ----------------------------------------------------------------------------
> Dr. Edward L. Hepler
> President, Adjunct Professor,
> VLSI Concepts, Inc. Villanova University Graduate Courses:
> VLSI and System ECE-8440 System Design and Modeling
> Architecture, Design, ECE-8445 Advanced Computer Architecture
> and CAD ECE-8460 VLSI Design
>
> email: hepler@vlsi-concepts.com or elh@ece.villanova.edu
> mobile: (484) 459-1126
> www: http://www.vlsi-concepts.com Read: I Cor 8:6
>
> On Thu, 28 Feb 2008, Keith Seitz wrote:
>
>> Edward L. Hepler wrote:
>>
>>> I'd like to use insight to drive gdb and have included the appropriate
>>> gdb modifications. The "gdb-side" appears to operate properly, but
>>> I'm still having some problems with the GUI portion. I'd appreciate
>>> any pointers you may be able to send that would help in adding a target
>>> to the GUI... An error pops up stating that "can't read
>>> "PREFS_state(gdb/load/default-portname value)" no such element in array"
>>
>> There are two preferences that are rather closely related, "*-port" and
>> "*-portname". The former is used with serial connections and the latter
>> with TCP connections. In this latter case, the TCP port NUMBER is stored in
>> *-portname (I don't know why!). [YUCK!]
>>
>> The "default" target settings are supposed to be initialized by
>> TargetSelection::_init_prefs, which is initialized when the target
>> selection dialog is CONSTRUCTED. Sigh. That's messed up, since
>> interface.tcl relies on these values in set_target_name. Yich. I'm
>> surprised this worked at all.
>>
>> Alas, as a quick hack, try this:
>>
>> 1) add a call to _init_prefs in either TargetSelection::getname or
>> TargetSelection::init_target_db. I would probably do it in init_target_db
>> and remove other calls to _init_pref in this file.
>>
>> 2) define the preference gdb/load/default-portname (set it to any integer)
>> in TargetSelection::_init_prefs (follow the example for default-port at the
>> end of this method).
>>
>> Let me know if that fixes your problem.
>>
>> Keith
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding a target?
2008-03-09 17:34 ` Edward L. Hepler
@ 2008-03-09 23:49 ` Keith Seitz
0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2008-03-09 23:49 UTC (permalink / raw)
To: Edward L. Hepler; +Cc: insight
Edward L. Hepler wrote:
> It appears that the "to_insert_breakpoint" function is not getting called.
Wow... This could require more specialized help...
> Do you know of changes that might have caused this to break?
> Is there some reason why the "to_insert_breakpoint" structure item
> would not be overloaded with the vr2000 entry when the ops target
> is changed?
I neither see anything obvious nor do I recall any changes in this area.
If your target vector's to_insert_breakpoint method is not being called,
your best bets are to chase down why to_insert_breakpoint is being set
to ignored (perhaps some new target vector ops have been inserted since
the release and you need to update your target vector definition?) or
you should contact gdb@sourceware.org and ask those people, since they
are in a much better position to help figure this one out. [I presume
that just using the command line exhibits the same problem...]
I wish I could be more help, but I've been too idle in gdb internals to
be able to help you efficiently.
Keith
PS. I will commit a patch for the default portname thing you pointed out.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-09 23:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-26 3:07 Adding a target? Edward L. Hepler
2008-02-26 18:13 ` Dave Korn
2008-03-06 3:31 ` Edward L. Hepler
2008-02-29 5:38 ` Keith Seitz
[not found] ` <Pine.GSO.4.62.0803081507200.8750@manx.misty.com>
2008-03-09 17:34 ` Edward L. Hepler
2008-03-09 23:49 ` Keith Seitz
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).