From: Andy Fan <zhihui.fan1213@gmail.com>
To: gdb@sourceware.org
Subject: Re: Get Different Result for the same core file with different versions of gdb.
Date: Tue, 2 Feb 2021 10:15:10 +0800 [thread overview]
Message-ID: <CAKU4AWqg8-bc4=ivQvubzaKgpqjt7hwuKoPBb=azSXxj+Ga4+A@mail.gmail.com> (raw)
In-Reply-To: <CAKU4AWpCgnZyOjMWW5XMYKQvMosRFX1r1OadJ42AoXW7cNnw8A@mail.gmail.com>
On Mon, Feb 1, 2021 at 11:57 AM Andy Fan <zhihui.fan1213@gmail.com> wrote:
> Hi:
>
> You can pay attention to $2 and $3.They check the same addr in the same
> core file.
> I'm sure I am debugging the same file in the same machine.
>
> GDB 7.6:
>
> (gdb) up 3
> #3 ResetPlanCache () at plancache.c:1922
> 1922 plancache.c: No such file or directory.
> (gdb) p ((AllocSet)plansource->query_context)->freelist
> $1 = {0x0, *0x5bdd3b8*, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
> (gdb) p *((AllocSet)plansource->query_context)->freelist[1]
> *$2 = {size = 10649824, aset = 0xa283c0 <AllocSetFree>}*
> (gdb) p plansource->query_context->name
> *$3 = 0xbfd929 "unnamed prepared statement"*
> (gdb) x /10c plansource->query_context->name
> 0xbfd929: 117 'u' 110 'n' 110 'n' 97 'a' 109 'm' 101 'e' 100 'd' 32 ' '
> 0xbfd931: 112 'p' 114 'r'
> (gdb) quit
>
>
> GDB 9.2:
> (gdb) up 3
> #3 ResetPlanCache () at plancache.c:1922
> 1922 plancache.c: No such file or directory.
> (gdb) p ((AllocSet)plansource->query_context)->freelist
> $1 = {0x0, *0x5bdd3b8*, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
> (gdb) p *((AllocSet)plansource->query_context)->freelist[1]
> *$2 = {size = 16, aset = 0x0}*
> (gdb) p plansource->query_context->name
> *$3 = 0xbfd929 ""*
> (gdb) x /10c plansource->query_context->name
> 0xbfd929: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0
> '\000'
> 0xbfd931: 0 '\000' 0 '\000'
>
>
> Any ideas? Thanks!
>
> --
> Best Regards
> Andy Fan
>
Will it have something with compiler? The compiler I used
to build the software (which generated the core file) is LLVM 6.0.0.
--
Best Regards
Andy Fan (https://www.aliyun.com/)
next parent reply other threads:[~2021-02-02 2:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKU4AWpCgnZyOjMWW5XMYKQvMosRFX1r1OadJ42AoXW7cNnw8A@mail.gmail.com>
2021-02-02 2:15 ` Andy Fan [this message]
2021-02-02 15:30 ` Simon Marchi
2021-02-03 2:56 ` Andy Fan
2021-02-03 15:29 ` Simon Marchi
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='CAKU4AWqg8-bc4=ivQvubzaKgpqjt7hwuKoPBb=azSXxj+Ga4+A@mail.gmail.com' \
--to=zhihui.fan1213@gmail.com \
--cc=gdb@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).