public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tankut.baris.aktemur at intel dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/26061] Wrong debug info for argc at -O2
Date: Sat, 30 May 2020 17:03:11 +0000	[thread overview]
Message-ID: <bug-26061-4717-fzduw5MBrd@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26061-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26061

--- Comment #1 from Baris Aktemur <tankut.baris.aktemur at intel dot com> ---
I used gcc-10 ((Ubuntu 10.1.0-2ubuntu1~18.04) 10.1.0) and gdb
(10.0.50.20200525-git), but the scenario did not reproduce.

My initial guess is that it's related to the debug info. I'd suggest printing
the value of argc in hex (e.g. `(gdb) p/x -8454` gives 0xffffdefa) and also
printing the address of local variables, in particular `buf`. Also, doing stepi
multiple times and checking the values each time an instruction is stepped may
help narrow down the problem.

Judging from the title, I conclude you also think that the problem is related
to the debug info. In that case, I believe it would fit better to report this
to gcc, rather than gdb.

PS: Just out of curiosity, I wonder why you CC'ed me to this bug report.
Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-05-30 17:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 12:30 [Bug symtab/26061] New: " yangyibiao at hust dot edu.cn
2020-05-29 15:47 ` [Bug symtab/26061] " yangyibiao at hust dot edu.cn
2020-05-30 17:03 ` tankut.baris.aktemur at intel dot com [this message]
2020-05-31  0:39 ` yangyibiao at hust dot edu.cn
2020-12-29  6:38 ` yangyibiao at outlook dot com
2022-05-29  2:24 ` yangyibiao at outlook dot com
2022-11-08  3:34 ` yangyibiao at nju dot edu.cn
2022-11-08  8:13 ` sam at gentoo dot org
2022-11-09  2:28 ` tromey at sourceware dot org
2022-11-09  2:42 ` yangyibiao at nju dot edu.cn

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=bug-26061-4717-fzduw5MBrd@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).