Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 5/7] Add support for software single step on ARM aarch32-linux in GDBServer.
Date: Mon, 14 Sep 2015 12:41:00 -0000	[thread overview]
Message-ID: <55F6C071.1040104@ericsson.com> (raw)
In-Reply-To: <8637yh5kpz.fsf@gmail.com>



On 09/14/2015 07:00 AM, Yao Qi wrote:
> Antoine Tremblay <antoine.tremblay@ericsson.com> writes:
>
>>   - GDBServer needs to know the correct endianness to write that breakpoint
>>     properly.
>
> Why does GDBserver need to care about endianess?  Isn't GDBserver of the
> same endianess as the inferior?
>

Usually it will be , however see commit : 
dcd4a3a4e7fc3912194d1346d2dfc6252f70b456

Which I will partially quote here :

"tdep->arm_breakpoint, tdep->thumb_breakpoint, tdep->thumb2_breakpoint
  should be set le_ variants in case of arm BE8 code. Those instruciton
  sequences are writen to target with simple write_memory, without
  regarding gdbarch_byte_order_for_code. But in BE8 case even data
  memory is in big endian form, instructions are still in little endian
  form."

So in BE8 code the instructions are not of the same endianness as the 
data memory...

Also even if unlikely you could have a BE program being debugged in a LE 
GDBServer assuming the proper BE libs are also present on the system.

Thus, GDB makes no assumptions about the endianness being the same as 
it's own and I don't think GDBServer should either.




  reply	other threads:[~2015-09-14 12:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1441973603-15247-1-git-send-email-antoine.tremblay@ericsson.com>
2015-09-11 12:13 ` [PATCH 2/7] Move some integer operations to common Antoine Tremblay
2015-09-11 14:24   ` Gary Benson
2015-09-11 17:16     ` Antoine Tremblay
2015-09-11 17:32       ` Antoine Tremblay
     [not found]         ` <20150914092453.GA26894@blade.nx>
2015-09-14 15:20           ` Antoine Tremblay
2015-09-14 15:28             ` [PATCH 2/7 v2] " Antoine Tremblay
     [not found]             ` <20150921091007.GA23767@blade.nx>
2015-09-21  9:16               ` [PATCH 2/7] " Pedro Alves
2015-09-21 17:49                 ` Antoine Tremblay
2015-09-22 16:06                   ` Doug Evans
2015-09-22 17:50                     ` Antoine Tremblay
2015-09-11 12:13 ` [PATCH 1/7] Fix instruction skipping when using software single step in GDBServer Antoine Tremblay
2015-09-11 12:14 ` [PATCH 7/7] Support tracepoints and software breakpoints on ARM aarch32-linux " Antoine Tremblay
2015-09-11 12:30   ` Eli Zaretskii
2015-09-11 12:43     ` Antoine Tremblay
2015-09-11 12:14 ` [PATCH 3/7] Support multiple breakpoint types per target " Antoine Tremblay
2015-09-11 12:14 ` [PATCH 4/7] Make breakpoint and breakpoint_len local variables " Antoine Tremblay
2015-09-11 12:14 ` [PATCH 5/7] Add support for software single step on ARM aarch32-linux " Antoine Tremblay
2015-09-14 11:00   ` Yao Qi
2015-09-14 12:41     ` Antoine Tremblay [this message]
2015-09-14 16:10       ` Yao Qi
2015-09-14 17:28         ` Antoine Tremblay
2015-09-15  7:22           ` Yao Qi
2015-09-15 12:33             ` Antoine Tremblay
2015-09-15 16:49               ` Antoine Tremblay
2015-09-11 12:14 ` [PATCH 6/7] Support conditional breakpoints on targets that can software single step " Antoine Tremblay
2015-09-14 10:33 ` [PATCH 0/7] Support tracepoints and software breakpoints on ARM aarch32-linux " Yao Qi
2015-09-14 13:23   ` Antoine Tremblay
2015-09-15 14:02     ` Yao Qi
2015-09-15 14:08       ` Antoine Tremblay

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=55F6C071.1040104@ericsson.com \
    --to=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.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