From: Simon Marchi <simark@simark.ca>
To: Eli Zaretskii <eliz@gnu.org>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: The 'cold' function attribute and GDB
Date: Thu, 02 May 2019 18:08:00 -0000 [thread overview]
Message-ID: <54a14b11-3c1d-956c-916c-e8ecae85a78e@simark.ca> (raw)
In-Reply-To: <83bm0kpzy9.fsf@gnu.org>
On 2019-05-02 12:45 p.m., Eli Zaretskii wrote:
>> Date: Thu, 2 May 2019 08:59:19 -0700
>> From: Kevin Buettner <kevinb@redhat.com>
>> Cc: gdb-patches@sourceware.org, simark@simark.ca
>>
>>> This is with GCC 8.2.0, btw.
>>
>> I'll give this a try.
>>
>> I have GCC 8.3.1 and 9.0.1 readily available. Do you think it's
>> important to use 8.2.0 ?
I just built gcc from git, and built emacs with it, and I get pretty much the
same ranges as you:
<1><66a91b>: Abbrev Number: 141 (DW_TAG_subprogram)
<66a91d> DW_AT_name : (indirect string, offset: 0xf3fe3): print_vectorlike
<66a921> DW_AT_decl_file : 1
<66a922> DW_AT_decl_line : 1365
<66a924> DW_AT_decl_column : 1
<66a925> DW_AT_prototyped : 1
<66a925> DW_AT_type : <0x65a0ff>
<66a929> DW_AT_ranges : 0x234cf0
<66a92d> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<66a92f> DW_AT_GNU_all_call_sites: 1
<66a92f> DW_AT_sibling : <0x66cf15>
And the ranges:
00234cf0 000000000057da80 000000000057e88f
00234cf0 00000000004173b1 00000000004173b6
00234cf0 <End of list>
In my case, the second range, the cold one, is one instruction long, just the call to emacs_abort:
00000000004173b1 <print_vectorlike.cold>:
4173b1: e8 77 ce ff ff callq 41422d <emacs_abort>
Can you give the steps to reproduce the bug that leads us there?
In the mean time, I tried to do "start", followed by "set $pc = 0x4173b1", and this is what I get as my
first frame:
#0 0x00000000004173b1 in print_vectorlike (obj=0x1, printcharfun=0x7fffffffdd18, escapeflag=<optimized out>, buf=0xa0 <error: Cannot access memory at address 0xa0>) at /home/smarchi/src/emacs/src/print.c:1824
The parameter values are bogus, and the rest of the frames are corrupted, because I don't have
the stack I would normally have when executing this code. But we can see that the full symbol
was found: the arguments are printed, and the function name is correct (doesn't include .cold).
So it looks like some debugging of this problem on Windows will be needed :(
Simon
next prev parent reply other threads:[~2019-05-02 18:08 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 18:59 Eli Zaretskii
2019-05-01 20:17 ` Simon Marchi
2019-05-02 2:51 ` Kevin Buettner
2019-05-02 6:59 ` Eli Zaretskii
2019-05-02 7:26 ` Kevin Buettner
2019-05-02 15:27 ` Eli Zaretskii
2019-05-02 15:59 ` Kevin Buettner
2019-05-02 16:46 ` Eli Zaretskii
2019-05-02 18:08 ` Simon Marchi [this message]
2019-05-02 18:47 ` Eli Zaretskii
2019-05-02 18:55 ` Kevin Buettner
2019-05-02 19:32 ` Eli Zaretskii
2019-05-02 19:51 ` Kevin Buettner
2019-05-02 7:06 ` Eli Zaretskii
2019-05-02 7:38 ` Kevin Buettner
2019-05-02 15:23 ` Eli Zaretskii
2019-05-02 15:56 ` Kevin Buettner
2019-05-02 16:43 ` Eli Zaretskii
2019-05-02 18:25 ` Kevin Buettner
2019-05-02 18:52 ` Eli Zaretskii
2019-05-02 19:13 ` Kevin Buettner
2019-05-02 19:28 ` Eli Zaretskii
2019-05-02 19:45 ` Kevin Buettner
2019-05-02 19:56 ` Eli Zaretskii
2019-05-02 23:30 ` Kevin Buettner
2019-05-04 8:30 ` Eli Zaretskii
2019-05-05 20:04 ` Kevin Buettner
2019-05-06 15:33 ` Eli Zaretskii
2019-05-06 16:24 ` Kevin Buettner
2019-05-02 15:17 ` Eli Zaretskii
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=54a14b11-3c1d-956c-916c-e8ecae85a78e@simark.ca \
--to=simark@simark.ca \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.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