public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/28014] gdb coredumps when remote+kgdbing a system that OOMs too hard
Date: Sat, 26 Jun 2021 02:29:56 +0000	[thread overview]
Message-ID: <bug-28014-4717-2SHcSYpk5F@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28014-4717@http.sourceware.org/bugzilla/>

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

--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
(In reply to Rich from comment #2)
> (In reply to Simon Marchi from comment #1)
> > Hi Rich,
> > 
> > (In reply to Rich from comment #0)
> > > I was using gdb on mips64el under qemu-user to remote a qemu of a mips64el
> > > system with kgdb, everything was going fine (from gdb's perspective - the
> > > system was in the process of eating all the RAM), then things went south.
> > 
> > Unrelated to the reported problem, but do you run GDB as a mips64el program
> > inside qemu-user only so that you can debug your remote mips64el program? 
> > It might be easier to run an x86-64 GDB (or whatever your host system is) to
> > connect to your mips64el remote.  That GDB just needs to be built to include
> > mips support, using --target=<your-triplet>, or
> > --enable-targets=<your-triplet>, or --enable-targets=all.
> 
> Yeah, but recompiling gdb with all the arches I might need is a timesink
> when I already had a chroot right there, and Debian's definitely doesn't
> have other targets enabled OOTB.

No problem, I mentioned it just in case.

IIRC, this package is GDB built with --enable-targets=all:
https://packages.debian.org/bullseye/gdb-multiarch.  So you could use it on a
host Debian.  But if your setup works, it works.

> It's just the gdb binary from Debian bullseye at this precise moment:
> https://www.dropbox.com/s/orf6tmcbctpjx16/gdb?dl=0
> 
> You may find this pretty useless, as none of my gdbs find the core useful,
> and so far nobody in #qemu has known how to make use of it either.

Hmm, no success here either.  And I couldn't find debug info for that build in
Debian's repos.

$ ./gdb -nx --data-directory=data-directory -q /tmp/gdb
/tmp/qemu_gdb_20210625-192829_18450.core
Reading symbols from /tmp/gdb...
(No debugging symbols found in /tmp/gdb)

warning: core file may not match specified executable file.
[New LWP 18450]
[New LWP 18479]
[New LWP 18480]
Core was generated by ``/@   d/@   h/@   u/@   y/@  '.
#0  0x0000004003148b4c in ?? ()
[Current thread is 1 (LWP 18450)]
(gdb) bt
warning: GDB can't find the start of the function at 0x4003148b4c.

    GDB is unable to find the start of the function at 0x4003148b4c
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x4003148b4c for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
#0  0x0000004003148b4c in ?? ()
(gdb)

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

  parent reply	other threads:[~2021-06-26  2:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 23:43 [Bug threads/28014] New: " rincebrain at gmail dot com
2021-06-26  1:20 ` [Bug threads/28014] " simark at simark dot ca
2021-06-26  2:15 ` rincebrain at gmail dot com
2021-06-26  2:29 ` simark at simark dot ca [this message]
2021-06-26  2:41 ` rincebrain at gmail dot com
2021-06-26  4:27 ` simark at simark dot ca
2021-06-26 10:55 ` rincebrain at gmail dot com
2021-06-26 13:04 ` simark at simark dot ca
2021-06-27  5:27 ` simark at simark dot ca
2021-06-27 12:24 ` rincebrain at gmail dot com

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-28014-4717-2SHcSYpk5F@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).