From: "Petr Hluzín" <petr.hluzin@gmail.com>
To: oza Pawandeep <oza.pawandeep@gmail.com>
Cc: Yao Qi <yao@codesourcery.com>, Tom Tromey <tromey@redhat.com>,
paawan oza <paawan1982@yahoo.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
chandra krishnappa <chandra_roadking@yahoo.com>
Subject: Re: [PATCH] arm reversible : <phase_2_complete>
Date: Sun, 04 Dec 2011 13:29:00 -0000 [thread overview]
Message-ID: <CAC=yr6Dt8Ema361JH7ghGAYO3FpuSQyk4PxTGHJ3LQVjVLiFoQ@mail.gmail.com> (raw)
In-Reply-To: <CAK1A=4wT8UrgdaOPDDggvdHBMnEh9b1mNLnOko9s51EV1zTXEQ@mail.gmail.com>
2011/12/4 oza Pawandeep <oza.pawandeep@gmail.com>:
> Hi,
>
> Updated patch contains all the 3 review comments fixed (Tom, Petr and Yao).
> Change log is elaborated; I am looking forwarding to adding more
> details if need. seeking for your feedback on the same.
>
> diff -urN arm_orig/ChangeLog arm_new/ChangeLog
> --- arm_orig/ChangeLog 2011-12-03 18:05:04.000000000 +0530
> +++ arm_new/ChangeLog 2011-12-04 16:45:00.000000000 +0530
> @@ -1,3 +1,65 @@
> +2011-12-03 Oza Pawandeep <oza.pawandeep@gmail.com>
> +
> + * arm-linux-tdep.c: arm_linux_init_abi modified to include
> + arm reversible debugging feature.
> + registered arm_process_record to gdb_arch
> + syscall pointer initialization.
> +
> + * arm-tdep.c: arm-reversible-debugging implementation.
> + newly added functions are as follows.
> +
> + > arm_process_record: handles basic initialization and record
> + summarisation, decodes basic insn ids, on which it hands over
> + controls to decode_insn.
> + > deallocate_reg_mem : clean up function
> + > decode_insn: Decodes arm/thumb insn and calls appropriate
> + decoding routine to record the change.
> + > thumb_record_branch: branch insn reording (thumb)
> + > thumb_record_ldm_stm_swi: load, store and sycall insn
> + recoding (thumb)
> + > thumb_record_misc: misc insn recording (thumb)
> + > thumb_record_ld_st_stack: store and stack insn recording (thumb)
> + > thumb_record_ld_st_imm_offset: load, store with immediate offset
> + insn recording (thumb)
> + > thumb_record_ld_st_reg_offset: load, store with register offset
> + recording (thumb)
> + > thumb_record_add_sub_cmp_mov: addition, subtractation, compare
> + and move insn recording (thumb)
> + > thumb_record_shift_add_sub: shift, add and sub insn recording
> + (thumb)
> + > arm_record_coproc_data_proc: coprocessor and data processing
> + recording (partially implemented) (arm)
> + > arm_record_coproc: coprocessor insn recording
> + (partially implemented) (arm)
> + > arm_record_b_bl: branch insn recording (arm)
> + > arm_record_ld_st_multiple: load and store multiple insn recording
> + (arm)
> + > arm_record_ld_st_reg_offset: load and store reg offset recording
> + (arm)
> + > arm_record_ld_st_imm_offset: load and store immediate offset
> + recording (arm)
> + > arm_record_data_proc_imm: data processing insn recording (arm)
> + > arm_record_data_proc_misc_ld_str: data processing, misc, load and
> + store insn recording (arm)
> + > arm_record_extension_space:arm extension space insn recording
> + (arm)
> + > arm_record_strx: str(X) type insn recording (arm)
> + > sbo_sbz: checks for mendatory sbo and sbz fields in insn,
> +
> + added new data structures:
> + > insn_decode_record_t: local record structure which contains insn's
> + record, which includes both reg and memory.
> +
> + REG_ALLOC and MEM_ALLOC macros takes care of actual memory allocation
> + in local record which is finally processed by arm_rocess_record.
> +
> + * arm-tdep.h: arm-reversible data structures
> +
> + > modified gdbarch_tdep: added member (function pointer) arm_swi_record
> + which is supposed to be recording system calls
> + > arm_process_record externed.
> +
> +
WOW, thats a lot of text. Other people's changelog entries are more
terse. For example the GNU guidelines say "For example, “New function”
is enough for the change log when you add a function, because there
should be a comment before the function definition to explain what it
does."
In function decode_insn():
> +
> + if (extract_arm_insn (arm_record, insn_size))
> + {
> + if (record_debug)
> + {
> + printf_unfiltered (_("Process record: error reading memory at "
> + "addr %s len = %d.\n"),
> + paddress (arm_record->gdbarch, arm_record->this_addr), insn_size);
> + return -1;
> + }
> + }
If the extract_arm_insn() call fails then the function returns only if
`record_debug' is true. This is strange. Enabling debugging traces
usually expected to only affect printing, here it affects behavior of
the decode_insn() function. Plus the rest of the function seems to
misbehave if it is passed failed result in `arm_record'. I guess the
`return -1;' statement should be moved outside of body of condition
`if (record_debug)'. Unortunatelly I did not notice that earlier.
In arm_process_record():
> +
> + if (extract_arm_insn (&arm_record, 2))
> + {
> + if (record_debug)
> + {
> + printf_unfiltered (_("Process record: error reading memory at "
> + "addr %s len = %d.\n"),
> + paddress (arm_record.gdbarch,
> + arm_record.this_addr), 2);
> + return -1;
> + }
> + }
The same applies here.
Except the one last thing the patch looks good to me now. My previous
suggestions have been resolved.
As always, I did not check whitespace, ARM semantics and Changelog entries.
--
Petr Hluzin
next prev parent reply other threads:[~2011-12-04 13:29 UTC|newest]
Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-29 15:38 paawan oza
2011-05-31 18:05 ` Tom Tromey
2011-06-03 7:44 ` paawan oza
2011-06-03 7:51 ` paawan oza
2011-07-12 21:10 ` Tom Tromey
2011-07-13 3:17 ` chandra krishnappa
2011-07-13 5:36 ` paawan oza
2011-07-13 15:20 ` Tom Tromey
2011-07-14 4:49 ` chandra krishnappa
2011-07-14 15:01 ` Yao Qi
2011-07-13 6:57 ` paawan oza
[not found] ` <1316327455.23344.YahooMailNeo@web112509.mail.gq1.yahoo.com>
2011-09-19 7:37 ` paawan oza
2011-09-22 17:12 ` oza Pawandeep
2011-09-27 6:52 ` oza Pawandeep
2011-10-06 18:01 ` oza Pawandeep
[not found] ` <CAK1A=4xuUT++WRzdUnZc0KodYF0AiukUyJa7Pr=wzb4i-OQ5eQ@mail.gmail.com>
2011-10-08 2:50 ` Fwd: " paawan oza
2011-10-11 18:11 ` [PATCH] arm reversible : <phase_2_complete> how to go ahead ? paawan oza
2011-10-11 19:02 ` Tom Tromey
2011-10-14 20:13 ` [PATCH] arm reversible : <phase_2_complete> Tom Tromey
2011-10-15 3:46 ` paawan oza
2011-10-15 7:01 ` chandra krishnappa
2011-10-15 9:32 ` Yao Qi
2011-10-15 13:33 ` Yao Qi
2011-10-15 16:34 ` oza Pawandeep
2011-10-15 17:38 ` oza Pawandeep
2011-10-16 8:00 ` oza Pawandeep
2011-10-16 8:44 ` oza Pawandeep
2011-10-17 4:25 ` Yao Qi
2011-10-17 3:18 ` Yao Qi
2011-10-17 4:28 ` oza Pawandeep
2011-10-17 15:42 ` chandra krishnappa
2011-11-03 17:10 ` Tom Tromey
2011-11-04 16:27 ` Yao Qi
2011-10-16 23:32 ` Petr Hluzín
2011-10-22 15:42 ` oza Pawandeep
2011-10-23 10:17 ` oza Pawandeep
2011-10-24 7:43 ` Petr Hluzín
2011-10-25 7:20 ` Yao Qi
2011-11-03 17:41 ` Tom Tromey
2011-11-05 17:36 ` Petr Hluzín
2011-11-03 17:38 ` Tom Tromey
2011-11-05 17:35 ` Petr Hluzín
2011-11-07 15:39 ` Tom Tromey
2011-11-08 6:02 ` oza Pawandeep
2011-11-08 10:17 ` Yao Qi
2011-11-08 10:45 ` oza Pawandeep
2011-11-09 5:28 ` oza Pawandeep
2011-11-09 6:08 ` oza Pawandeep
2011-11-17 9:24 ` oza Pawandeep
2011-11-17 9:52 ` Yao Qi
2011-11-17 20:40 ` Tom Tromey
2011-11-18 3:18 ` oza Pawandeep
2011-11-18 17:22 ` Tom Tromey
2011-11-19 9:43 ` oza Pawandeep
2011-11-19 11:39 ` oza Pawandeep
2011-12-02 18:36 ` Tom Tromey
2011-12-03 8:20 ` oza Pawandeep
2011-12-03 14:18 ` oza Pawandeep
2011-12-03 16:32 ` Petr Hluzín
2011-12-03 18:46 ` oza Pawandeep
2011-12-03 19:02 ` oza Pawandeep
2011-12-03 20:30 ` Petr Hluzín
[not found] ` <1322975560.12415.YahooMailNeo@web112518.mail.gq1.yahoo.com>
2011-12-04 7:09 ` paawan oza
2011-12-04 1:47 ` Yao Qi
2011-12-04 8:26 ` oza Pawandeep
2011-12-04 11:33 ` oza Pawandeep
2011-12-04 13:29 ` Petr Hluzín [this message]
2011-12-04 14:46 ` Yao Qi
2011-12-04 17:00 ` oza Pawandeep
2011-12-04 23:46 ` Yao Qi
2011-12-05 5:35 ` oza Pawandeep
2011-12-05 8:12 ` Yao Qi
2011-12-05 16:02 ` oza Pawandeep
2011-12-19 6:26 ` oza Pawandeep
2011-12-20 19:11 ` Tom Tromey
2011-12-28 12:43 ` oza Pawandeep
2012-01-05 11:01 ` oza Pawandeep
2012-01-05 12:03 ` Eli Zaretskii
2012-01-05 16:17 ` Tom Tromey
2012-01-05 18:17 ` oza Pawandeep
2012-01-06 8:06 ` oza Pawandeep
2012-01-06 19:13 ` Tom Tromey
2012-01-07 6:31 ` oza Pawandeep
2012-01-09 16:25 ` Tom Tromey
2012-02-02 6:29 ` oza Pawandeep
[not found] ` <m38vkfoiut.fsf@fleche.redhat.com>
[not found] ` <CAK1A=4xrUBzcG1i7NHyEtmAjwx0nbYmkePFS9_kQcS3E1gaduA@mail.gmail.com>
[not found] ` <m3haz19ezl.fsf@fleche.redhat.com>
[not found] ` <CAK1A=4w+yq9AvRMukPcKpZnGjrVnPbE3zdScwRd1Skubt0KHWA@mail.gmail.com>
2012-03-07 5:35 ` oza Pawandeep
2012-03-08 16:32 ` Tom Tromey
2012-03-09 9:30 ` oza Pawandeep
2012-03-09 16:47 ` Tom Tromey
2012-03-12 6:23 ` oza Pawandeep
2012-03-12 6:55 ` Yao Qi
2012-03-12 9:14 ` oza Pawandeep
2012-03-12 15:32 ` oza Pawandeep
2012-03-12 19:43 ` Tom Tromey
2012-03-13 5:41 ` oza Pawandeep
2011-12-03 15:06 ` oza Pawandeep
2011-12-20 19:05 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2011-08-10 17:09 chandra krishnappa
2011-08-11 1:34 ` Yao Qi
[not found] <BANLkTins056mmtd_9U_4iYXEeC2jRZSRsA@mail.gmail.com>
2011-06-06 17:42 ` chandra krishnappa
2011-07-05 8:47 ` oza Pawandeep
2011-05-24 7:19 paawan oza
[not found] <341905.10459.qm@web112513.mail.gq1.yahoo.com>
[not found] ` <m3d3m8xdf7.fsf@fleche.redhat.com>
[not found] ` <208397.95006.qm@web112517.mail.gq1.yahoo.com>
[not found] ` <4DA27006.1080607@codesourcery.com>
2011-04-16 21:03 ` [PATCH] arm reversible : progress <phase_2_complete> 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-09 14:57 ` Tom Tromey
2011-05-10 5:42 ` paawan oza
2011-05-10 15:37 ` Tom Tromey
2011-05-12 5:06 ` paawan oza
2011-05-10 5:50 ` paawan oza
2011-05-12 21:21 ` Petr Hluzín
2011-05-24 6:44 ` 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
2011-04-20 19:10 [PATCH] arm reversible <phase_2_complete> oza Pawandeep
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='CAC=yr6Dt8Ema361JH7ghGAYO3FpuSQyk4PxTGHJ3LQVjVLiFoQ@mail.gmail.com' \
--to=petr.hluzin@gmail.com \
--cc=chandra_roadking@yahoo.com \
--cc=gdb-patches@sourceware.org \
--cc=oza.pawandeep@gmail.com \
--cc=paawan1982@yahoo.com \
--cc=tromey@redhat.com \
--cc=yao@codesourcery.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