From: Jim Blandy <jimb@codesourcery.com>
To: 秦巍 <qinwei@sunnorth.com.cn>
Cc: bjgnu@sunnorth.com.cn, gdb-patches@sourceware.org
Subject: Re: [patch] add target Score to GDB
Date: Thu, 07 Dec 2006 20:18:00 -0000 [thread overview]
Message-ID: <m3y7pjfoi0.fsf@codesourcery.com> (raw)
In-Reply-To: <OFB3E2512A.A6A8BF17-ON4825723D.0041E603-4825723D.004B00D2@sunnorth.com.cn> (=?utf-8?B?56em5beNJ3M=?= message of "Thu, 7 Dec 2006 21:39:14 +0800")
秦巍<qinwei@sunnorth.com.cn> writes:
> Jim Blandy <jimb@codesourcery.com> wrote on 2006-12-07 03:41:54:
>
>> qinwei@sunnorth.com.cn writes:
>> > If we won't open simulator source, can we put simulator libs(11 libs)
> and
>> > simstub.c in the dir 'gdb-6.5/sim/score'?
>> > If we can, i will send you these libs.
>> > Otherwise, i post the patch in the following just containing 'score'
> gdb
>> > but without simulator.
>>
>> The GDB source tree cannot contain non-Free software. We give our
>> users all the rights to modify and redistribute the software that we
>> have, on the condition that they do the same for others; that's the
>> founding principle of Project GNU. Including non-free libraries with
>> GDB would not follow that principle.
>>
>> We encourage you to free your simulator; if that's not possible, then
>> we'll need to leave the simulator out.
>
> Hi Jim,
> Sorry our company SunNorth doesn't want to open simulator source, please
> leave it out.
Okay.
>> Does the S+core architecture allow you to mix 32-bit and 16-bit
>> instructions? If so, could score_breakpoint_from_pc be simplified to
>> always return a 16-bit breakpoint? This would mean that a breakpoint
>> inserted at a 32-bit instruction would produce two bytes of garbage
>> after the breakpoint, but that's normal; on the i386, GDB uses a
>> one-byte breakpoint instruction regardless of the length of the
>> instruction it's set at.
>
> Yes, score supports the mixture of 32-bit and 16-bit instructions.
> But score uses the word address to fetch instruction, and then identify if
> the 32-bits data
> is a 32-bit instruction or 2 16-bit instructions.
> Only setting 16-bit breakpoint instruction will affect score indentifing
> instruction types
> and cause error both on hardware and simulator.
I see --- there's much more going on here than there is in most other
processors.
>> Does score_integer_to_address do exactly the same thing that GCC does
>> when the user casts an integer to an address? If they don't, then the
>> user could become quite confused when GDB and GCC evaluate their
>> expressions differently.
>
> I didn't see clearly about this hook when i was porting score gdb.
> I have seen your NOTES in 'value_as_address'.
> The pointer and the address are the same on score target,
> and a pointer to a function always points to the entry point address of
> that function.
> So we don't need to implement this hook. Can i say that?
If you don't need to set it to get clean test suite results, then I
would definitely recommend leaving it out.
>> Future revisions of GCC change the sorts of prologues GDB will
>> encounter. If you find yourself investing more time than you expected
>> on score_analyze_prologue, consider using the framework in
>> prologue-value.h, documented there.
>
> The next step i will survey other methods such as using
> prologue-value.[ch] or
> using .eh_frame section and will post new patches.
>
> Can this patch be checked in first?
Using prologue-value certainly isn't required; I just wanted to
suggest it.
There should be patches to Makefile.in; could you post those? We need
to see the complete patch in order to approve it.
All changes need a ChangeLog entry. You don't need to say much for
score-tdep.c and score-tdep.h; here's the entry for the xtensa port:
2006-11-14 Maxim Grigoriev <maxim@tensilica.com>
* NEWS: New port to Xtensa.
* Makefile.in: Add dependencies for Xtensa files.
* configure.tgt (xtensa*, xtensa*-*-elf*): New.
* configure.host (xtensa*-*-elf*): New.
* config/xtensa/xtensa.mt: New file.
* xtensa-config.c: New file.
* xtensa-tdep.h: New file.
* xtensa-tdep.c: New file.
(I would prefer that the Makefile.in entry actually listed the
variables and rules added.)
Please keep all lines under 80 characters in length; for example,
score_unwind_dummy_id needs to be reformatted.
I'm surprised by score_type_needs_double_align --- is it really true
that struct types only need double alignment if their *first* member
does? Why is that? I'd expect the code for structs and unions to be
the same.
Other than that, this looks good. Please post a complete patch,
generated against the current CVS sources, and with a ChangeLog entry,
for a final review, and then we'll get it committed.
next parent reply other threads:[~2006-12-07 20:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OFB3E2512A.A6A8BF17-ON4825723D.0041E603-4825723D.004B00D2@sunnorth.com.cn>
2006-12-07 20:18 ` Jim Blandy [this message]
2006-12-09 6:23 ` 秦巍
2007-01-03 0:08 ` Jim Blandy
2007-01-03 22:28 ` Jim Blandy
2007-01-04 9:22 ` qinwei
2006-12-06 5:33 qinwei
2006-12-06 19:41 ` Jim Blandy
-- strict thread matches above, loose matches on Subject: below --
2006-12-05 2:16 bjgnu
2006-12-05 20:00 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y7pjfoi0.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=bjgnu@sunnorth.com.cn \
--cc=gdb-patches@sourceware.org \
--cc=qinwei@sunnorth.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox