From: Tom Tromey <tromey@redhat.com>
To: paawan oza <paawan1982@yahoo.com>
Cc: "gdb\@sourceware.org" <gdb@sourceware.org>
Subject: Re: [PATCH] arm reversible : progress <patch_1_phase_2>
Date: Thu, 03 Mar 2011 18:32:00 -0000 [thread overview]
Message-ID: <m3d3m8xdf7.fsf@fleche.redhat.com> (raw)
In-Reply-To: <341905.10459.qm@web112513.mail.gq1.yahoo.com> (paawan oza's message of "Wed, 2 Mar 2011 20:08:27 -0800 (PST)")
>>>>> ">" == paawan oza <paawan1982@yahoo.com> writes:
>> I am done with the deisng for both thumb and arm framework.
Thanks for your work on this.
>> having some doubts as of now.
I can't help with the ARM-specific stuff, but I have a few more general
comments.
>> diff -urN arm_new/arm-linux-tdep.c arm_orig/arm-linux-tdep.c
The patch is reversed.
>> - /* Enable process record */
>> - set_gdbarch_process_record(gdbarch, arm_process_record);
There are a bunch of minor coding style problems in the patch.
You'll have to fix them all before submitting.
In the quoted lines: the comment must end with a period and two spaces,
and there is a space missing before the open paren. That is, the code
should look like:
/* Enable process record. */
set_gdbarch_process_record (gdbarch, arm_process_record);
These two problems appear frequently.
>> -int arm_handle_data_proc_misc_load_str_insn (void*);
I did not read closely, but I think most or maybe all of the functions
declared here should be static. This applies to some other objects as
well, like arm_handle_insn.
Actually, in most cases, I think the code could be rearranged so that
you don't need forward declarations at all.
>> - else if(ARM_INSN_SIZE_BYTES == insn_size)
Space after the "if" -- this happens a lot.
>> - struct gdbarch_tdep *tdep = gdbarch_tdep ((struct gdbarch*) arm_insn_r-> gdbarch);
I think you don't need the cast here.
I think this occurs in a few places.
>> - struct regcache *reg_cache = (struct regcache*) arm_insn_r->regcache;
Or here. But if you needed something like this, there would have to be
a space before the "*".
>> - /* data processing insn /multiply sinsn */
>> - if(9 == arm_insn_r->decode)
One thing I dislike about the x86 record code is the huge number of
constants. I think this sort of thing is better if you use some
symbolic name instead.
One idea would be to share things with opcodes/arm-dis.c somehow.
I don't know if that is practical or not.
Actually, I have never understood why the process record stuff doesn't
share more code with the simulators. Maybe that is just too much work
somehow.
And, whatever happened to the QEMU-based replay approach? That seemed
promising to me.
>> - arm_insn_r->arm_regs = (uint32_t*)xmalloc (sizeof(uint32_t)*3);
I think it is a little clearer to use the libiberty macros, e.g.:
arm_insn_r->arm_regs = XNEWVEC (uint32_t, 3);
>> - uint32_t reg_val1=0,reg_val2=0;
Spaces around the "=" signs. This occurs in a few places.
Tom
next prev parent reply other threads:[~2011-03-03 18:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 4:08 paawan oza
2011-03-03 18:32 ` Tom Tromey [this message]
2011-03-03 18:37 ` Michael Snyder
2011-03-03 18:59 ` Pedro Alves
2011-03-04 3:32 ` paawan oza
2011-03-04 3:56 ` paawan oza
2011-03-04 19:31 ` Tom Tromey
2011-03-04 20:09 ` Michael Snyder
2011-03-04 20:11 ` Tom Tromey
2011-04-10 9:41 ` [PATCH] arm reversible : progress <phase_2_complete> paawan oza
2011-04-11 3:05 ` Yao Qi
2011-04-11 4:52 ` paawan oza
2011-04-12 10:58 ` Yao Qi
2011-04-16 21:03 ` paawan oza
2011-04-20 19:16 ` [PATCH] arm reversible : <phase_2_complete> paawan oza
2011-04-21 20:55 ` Petr Hluzín
2011-04-22 5:49 ` paawan oza
2011-04-22 5:55 ` oza Pawandeep
2011-04-25 14:03 ` paawan oza
2011-05-01 1:20 ` Petr Hluzín
2011-05-02 14:47 ` Tom Tromey
2011-05-04 21:33 ` Petr Hluzín
2011-05-05 15:29 ` Tom Tromey
2011-05-07 13:50 ` paawan oza
2011-05-07 13:56 ` paawan oza
[not found] ` <172713.29831.qm__351.089161313389$1303740245$gmane$org@web112503.mail.gq1.yahoo.com>
2011-04-25 19:57 ` Tom Tromey
2011-04-28 18:26 ` paawan oza
2011-04-28 19:00 ` Tom Tromey
2011-04-28 19:22 ` paawan oza
[not found] ` <727567.12089.qm__13056.408687453$1304018591$gmane$org@web112511.mail.gq1.yahoo.com>
2011-04-28 19:36 ` Tom Tromey
2011-04-30 16:16 ` paawan oza
2011-05-02 13:28 ` Tom Tromey
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=m3d3m8xdf7.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=paawan1982@yahoo.com \
/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