public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tromey@adacore.com>
Cc: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix DAP stackTrace through frames without debuginfo
Date: Thu, 9 Mar 2023 21:35:15 +0100	[thread overview]
Message-ID: <b912f1e7-4518-1c74-e3ce-622291d046f5@suse.de> (raw)
In-Reply-To: <87356dojbh.fsf@tromey.com>

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

On 3/9/23 19:45, Tom Tromey wrote:
> Tom> Sure.  Still a FAIL, but a different error.  Log attached.
> 
> Ok, I finally figured it out (I think) and it's a latent bug in
> frames.py.  I have no idea how/why this ever worked.
> 

Sorry, yet another error.

Thanks,
- Tom

[-- Attachment #2: dap.log.1 --]
[-- Type: text/plain, Size: 4564 bytes --]

READ: <<<{"seq": 2, "type": "request", "command": "launch", "arguments": {"program": "/data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dap/bt-nodebug/bt-nodebug"}}>>>
WROTE: <<<{"request_seq": 2, "type": "response", "command": "launch", "success": true}>>>
+++ file /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dap/bt-nodebug/bt-nodebug
READ: <<<{"seq": 3, "type": "request", "command": "setFunctionBreakpoints", "arguments": {"breakpoints": [{"name": "function_breakpoint_here"}]}}>>>
>>> Reading symbols from /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dap/bt-nodebug/bt-nodebug...

WROTE: <<<{"type": "event", "event": "breakpoint", "body": {"reason": "new", "breakpoint": {"id": 1, "verified": true, "source": {"name": "bt-main.c", "path": "/data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.dap/bt-main.c", "sourceReference": 0}, "line": 23, "instructionReference": "0x4004ab"}}}>>>
WROTE: <<<{"request_seq": 3, "type": "response", "command": "setFunctionBreakpoints", "body": {"breakpoints": [{"id": 1, "verified": true, "source": {"name": "bt-main.c", "path": "/data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.dap/bt-main.c", "sourceReference": 0}, "line": 23, "instructionReference": "0x4004ab"}]}, "success": true}>>>
WROTE: <<<{"type": "event", "event": "output", "body": {"category": "stdout", "output": "Breakpoint 1 at 0x4004ab: file /data/vries/gdb/src/gdb/testsuite/gdb.dap/bt-main.c, line 23.\n"}}>>>
READ: <<<{"seq": 4, "type": "request", "command": "configurationDone"}>>>
WROTE: <<<{"request_seq": 4, "type": "response", "command": "configurationDone", "success": true}>>>
+++ run
WROTE: <<<{"type": "event", "event": "thread", "body": {"reason": "started", "threadId": 1}}>>>
_suppress_cont case
WROTE: <<<{"type": "event", "event": "breakpoint", "body": {"reason": "changed", "breakpoint": {"id": 1, "verified": true, "source": {"name": "bt-main.c", "path": "/data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.dap/bt-main.c", "sourceReference": 0}, "line": 23, "instructionReference": "0x4004ab"}}}>>>
entering _on_stop: <gdb.BreakpointEvent object at 0x7f61b03e0648>
WROTE: <<<{"type": "event", "event": "stopped", "body": {"threadId": 1, "allThreadsStopped": true, "hitBreakpointIds": [1], "reason": "breakpoint"}}>>>
>>> Starting program: /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dap/bt-nodebug/bt-nodebug 
[setting tty state failed in terminal_inferior: Inappropriate ioctl for device]

READ: <<<{"seq": 5, "type": "request", "command": "stackTrace", "arguments": {"threadId": 1}}>>>
+++ thread 1
>>> [Switching to thread 1 (process 30982)]
#0  function_breakpoint_here () at /data/vries/gdb/src/gdb/testsuite/gdb.dap/bt-main.c:23
23	}

Traceback (most recent call last):
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/server.py", line 75, in _handle_command
    body = _commands[params["command"]](**args)
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/bt.py", line 93, in stacktrace
    return send_gdb_with_response(lambda: _backtrace(threadId, levels, startFrame))
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/startup.py", line 192, in send_gdb_with_response
    raise val
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/startup.py", line 184, in message
    val = fn()
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/bt.py", line 93, in <lambda>
    return send_gdb_with_response(lambda: _backtrace(threadId, levels, startFrame))
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/startup.py", line 78, in ensure_gdb_thread
    return func(*args, **kwargs)
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/bt.py", line 62, in _backtrace
    "id": frame_id(current_frame),
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/startup.py", line 78, in ensure_gdb_thread
    return func(*args, **kwargs)
  File "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/frames.py", line 49, in frame_id
    return _frame_ids[frame]
KeyError: <gdb.Frame object at 0x7f61b0047bb0>
WROTE: <<<{"request_seq": 5, "type": "response", "command": "stackTrace", "success": false, "message": "<gdb.Frame object at 0x7f61b0047bb0>"}>>>
READ: <<<{"seq": 6, "type": "request", "command": "disconnect"}>>>
WROTE: <<<{"request_seq": 6, "type": "response", "command": "disconnect", "success": true}>>>
+++ quit
WROTE: <<<{"type": "event", "event": "exited", "body": {"exitCode": 0}}>>>

  reply	other threads:[~2023-03-09 20:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 19:48 Tom Tromey
2023-03-06 15:17 ` Tom Tromey
2023-03-09  8:38   ` Tom de Vries
2023-03-09 14:24     ` Tom Tromey
2023-03-09 14:52     ` Tom Tromey
2023-03-09 16:10       ` Tom de Vries
2023-03-09 18:45         ` Tom Tromey
2023-03-09 20:35           ` Tom de Vries [this message]
2023-03-13 18:46             ` Tom Tromey
2023-03-14 13:08             ` Tom Tromey
2023-03-14 13:28               ` Tom de Vries
2023-03-14 14:03                 ` Tom Tromey

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=b912f1e7-4518-1c74-e3ce-622291d046f5@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).