Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Use target_read_code in skip_prologue (i386)
Date: Sat, 30 Nov 2013 11:43:00 -0000	[thread overview]
Message-ID: <5299B6F8.9070800@redhat.com> (raw)
In-Reply-To: <1385735051-27558-2-git-send-email-yao@codesourcery.com>

On 11/29/2013 02:24 PM, Yao Qi wrote:
> This patch uses target_read_code and its variants to read target
> memory in the functions related to i386_skip_prologue.

(IMO, it'd be nice if relevant part of the '0/3' cover letter
ended up in the commit log.)

> 2013-11-29  Yao Qi  <yao@codesourcery.com>

Looks good to me.  Minor comments below.

> 
> 	* corefile.c (read_code): New function.
> 	(read_code_integer): New function.
> 	(read_code_unsigned_integer): New function.
> 	* gdbcore.h (read_code): Declare

Missing period.

> 	(read_code_integer): Declare.

...

> diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
> index 41bcf1f..8e0847b 100644
> --- a/gdb/gdbcore.h
> +++ b/gdb/gdbcore.h
> @@ -57,6 +57,10 @@ extern void read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
>  
>  extern void read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
>  
> +/* Like target_read_code, but report an error if can't read.  */
> +
> +extern void read_code (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
> +
>  /* Read an integer from debugged memory, given address and number of
>     bytes.  */
>  
> @@ -73,6 +77,19 @@ extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr,
>  					      int len,
>  					      enum bfd_endian byte_order);
>  
> +/* Read an integer from debugged code memory, given address and
> +   number of bytes.  */

/* Read an integer from debugged code memory, given address,
   number of bytes, and byte order for code.  */

> +
> +extern LONGEST read_code_integer (CORE_ADDR memaddr, int len,
> +				  enum bfd_endian byte_order);
> +
> +/* Read an unsigned integer from debugged code memory, given address
> +   and number of bytes.  */

Likewise.

> +
> +extern ULONGEST read_code_unsigned_integer (CORE_ADDR memaddr,
> +					    int len,
> +					    enum bfd_endian byte_order);
> +

Thanks,
-- 
Pedro Alves


  reply	other threads:[~2013-11-30  9:59 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 14:27 [PATCH 0/3] Use target_read_code in skip_prologue Yao Qi
2013-11-29 14:27 ` [PATCH 2/3] skip_prolgoue (amd64) Yao Qi
2013-11-29 14:38   ` Mark Kettenis
2013-11-29 18:55     ` Mark Kettenis
2013-11-30  3:40       ` Yao Qi
2013-11-30 12:01         ` Pedro Alves
2013-12-02  7:34           ` Yao Qi
2013-12-03 18:28             ` Pedro Alves
2013-12-04  2:34             ` Yao Qi
2013-12-04 12:08               ` Pedro Alves
2013-12-04 15:38                 ` Tom Tromey
2013-12-04 18:31                   ` Doug Evans
2013-12-05 11:31                   ` Pedro Alves
2013-12-05  1:21                 ` Yao Qi
2013-12-05 12:08                   ` Pedro Alves
2013-12-05 14:08                     ` Yao Qi
2013-12-05 14:37                       ` Pedro Alves
2013-12-08  8:01                 ` Yao Qi
2013-12-08  8:26                   ` Doug Evans
2013-12-09  1:45                     ` Yao Qi
2013-12-09 11:32                       ` Pedro Alves
2013-12-09 11:53                   ` Pedro Alves
2013-12-09 13:03                     ` Yao Qi
2013-12-09 13:13                       ` Pedro Alves
2013-12-09 13:58                         ` Yao Qi
2013-12-09 15:34                           ` Pedro Alves
2013-12-10  0:57                             ` Yao Qi
2013-12-10 10:23                               ` Pedro Alves
2013-12-10 12:02                                 ` Yao Qi
2013-12-04 17:42             ` Doug Evans
2013-12-04 18:00             ` Doug Evans
2013-12-04 17:54           ` Doug Evans
2013-12-05  1:39             ` Yao Qi
2013-12-05 11:47             ` Pedro Alves
2013-11-29 14:36 ` [PATCH 1/3] Use target_read_code in skip_prologue (i386) Yao Qi
2013-11-30 11:43   ` Pedro Alves [this message]
2013-11-29 14:38 ` [PATCH 3/3] Perf test case: skip-prologue Yao Qi
2013-12-03  7:34   ` Yao Qi
2013-12-10 12:45     ` Yao Qi

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=5299B6F8.9070800@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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