public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode
Date: Tue, 30 Sep 2014 14:04:00 -0000	[thread overview]
Message-ID: <542AB75A.7030606@codesourcery.com> (raw)
In-Reply-To: <54202887.2090401@codesourcery.com>

On 09/22/2014 09:47 PM, Yao Qi wrote:
> On 09/15/2014 08:25 PM, Yao Qi wrote:
>> Subject: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode
>>
>> We see the fail in gdb.dwarf2/dwz.exp in thumb mode,
>>
>> p the_int^M
>> $2 = 99^M
>> (gdb) FAIL: gdb.dwarf2/dwz.exp: p the_int
>>
>> In thumb mode, the lsb of references to 'main' in the assembly
>> (produced by dwarf assember) is set, so the generated debug
>> information is incorrect.
>>
>> in this patch, we add a label main_label inside function main.  Linker
>> doesn't set its lsb in thumb mode, and we can get function main's
>> address by 'main_label - $main_label_offset'.  This label isn't moved
>> out of function main in both gcc and clang.
>>
>> gdb/testsuite:
>>
>> 2014-09-15  Yao Qi  <yao@codesourcery.com>
>>
>> 	* gdb.dwarf2/main.c (main): New lable main_label.
>> 	* gdb.dwarf2/dwz.exp: Get the offset of main_label to main.
>> 	Return early if $main_label_offset is unknown.  Get address
>> 	of main by "main_label - $main_label_offset".
> 
> Ping.  https://sourceware.org/ml/gdb-patches/2014-09/msg00497.html
> 

Ping.

-- 
Yao (齐尧)

  reply	other threads:[~2014-09-30 14:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03  1:23 Yao Qi
2014-09-03 17:51 ` Doug Evans
2014-09-05 11:08   ` Yao Qi
2014-09-14  9:35 ` Yao Qi
2014-09-15 12:29   ` Yao Qi
2014-09-22 13:52     ` Yao Qi
2014-09-30 14:04       ` Yao Qi [this message]
2014-10-07 14:03         ` Yao Qi
2014-10-08 15:21     ` Doug Evans
2014-09-14 11:31 Andreas Schwab
2014-09-14 14:37 ` Yao Qi
2014-09-14 15:24   ` Andreas Schwab
2014-09-15  2:09     ` Yao Qi
2014-09-15  8:57       ` Andreas Schwab

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=542AB75A.7030606@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).