Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Tweak gdb.trace/tfile.c for thumb mode
Date: Wed, 09 Jul 2014 11:55:00 -0000	[thread overview]
Message-ID: <53BD2CCD.8000700@codesourcery.com> (raw)
In-Reply-To: <1404100222-2312-1-git-send-email-yao@codesourcery.com>

On 06/30/2014 11:50 AM, Yao Qi wrote:
> We see the fail below happens on thumb related multi-libs
> (-mthumb -march={armv4t,armv7-a}),
> 
> target tfile tfile-basic.tf ^M
> warning: Uploaded tracepoint 1 has no source location, using raw address^M
> warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M
> Tracepoint 3 at 0x8958: file /scratch/yqi/arm-none-linux-gnueabi/src/gdb-trunk/gdb/testsuite/gdb.trace/tfile.c, line 91.^M
> Created tracepoint 3 for target's tracepoint 1 at 0x8959.^M
> warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M
> warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M
> warning: Breakpoint address adjusted from 0x00008959 to 0x00008958.^M
> (gdb) FAIL: gdb.trace/tfile.exp: complete-command 'target tfile'
> 
> The address of write_basic_trace_file is two-bytes aligned,
> 
> (gdb) p write_basic_trace_file
> $1 = {void (void)} 0x8958 <write_basic_trace_file>
> 
> but the ld sets the LSB of every reference to the function address
> (indicating the address is in thumb mode), so "&write_basic_trace_file"
> in the program becomes 0x8959, which is saved in the trace file.  That
> is why the warnings are emitted.
> 
> This patch is to clear the LSB of the function address written to trace
> file in thumb and thumb2 mode.  This patch fixes the fail above.
> 
> gdb/testsuite:
> 
> 2014-06-30  Yao Qi  <yao@codesourcery.com>
> 
> 	* gdb.trace/tfile.c (write_basic_trace_file): Clear the lsb of
> 	the function address written to trace file.

Ping?

Update the changelog entry a little,

2014-07-09  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/tfile.c (write_basic_trace_file)
	[__thumb__||__thumb2__]: Clear the lsb of the function address
	written to trace file.

-- 
Yao (齐尧)


  reply	other threads:[~2014-07-09 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30  3:52 Yao Qi
2014-07-09 11:55 ` Yao Qi [this message]
2014-07-09 14:52 ` Pedro Alves
2014-07-10  1:30   ` Yao Qi
2014-07-15 13:20     ` Pedro Alves
2014-07-15 14:16       ` Yao Qi
2014-07-15 14:38         ` Pedro Alves
2014-07-16  2:19           ` Yao Qi
2014-07-16  5:19             ` Yao Qi
2014-07-16 19:02             ` Pedro Alves

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=53BD2CCD.8000700@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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