gdbgui icon indicating copy to clipboard operation
gdbgui copied to clipboard

No data to display in Registers

Open 0400H opened this issue 2 years ago • 8 comments

ENV: Ubuntu 18.04 Docker gcc/g++ 7.5.0 gdb 8.1.1 python 3.6.9

pip3 install gdbgui==0.15.0.1

image

0400H avatar Oct 25 '21 12:10 0400H

same problem!!

jmp0x7c00 avatar Nov 10 '21 08:11 jmp0x7c00

I have the same issue, missing the register information aswell as the stack view as seen here: https://www.gdbgui.com/screenshots/

AlEscher avatar Jan 23 '22 12:01 AlEscher

Same issue, Specs as follows:

gcc (Debian 10.2.1-6) 10.2.1 20210110 GNU gdb (Debian 10.1-1.7) Linux debian 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux Python 3.9.2

hffaust avatar Mar 30 '22 04:03 hffaust

I also have the same problem. I find a temporary solution using gdbgui console in the lower-right corner

Immagine 2022-05-16 110430

if you want to see register information you only need to write the follow command info registers r0 r1 r2 followed by the name of the registers you need to see. Each register name must be separated by a space from each other

I suggest that this is a front-end problem because, if you inspect the register information div, it has no id. Instead others element which can display data to users has it

Giuliobell avatar May 16 '22 09:05 Giuliobell

Same problem here, Ubuntu 20.04, gdbgui 0.15.0.1

dcabanis avatar Jun 27 '22 12:06 dcabanis

same problem. Is it fixed or any other solutions?

listentodella avatar Aug 17 '22 14:08 listentodella

I am able to reproduce this, it must have broken somehow. I will have to take a look and fix this. Sorry for the inconvenience.

For now, a workaround would be to use the gdb cli to print register values.

cs01 avatar Aug 17 '22 20:08 cs01

Any plans to fix it ? Or can I revert it to worked version ? I really love this tool !

listentodella avatar Sep 18 '22 09:09 listentodella

You should be able to install older versions from pip with pip install gdbgui==VERSION

cs01 avatar Oct 04 '22 04:10 cs01

I have tried using docker to create a standard dev environment to debug, but compiling fails with nox , and it looks like there are too many dependencies that need to be installed and configured to the correct versions.

About a year ago, VS Code did not support to view registers while debugging, but it supports now. Although there are still some small bugs, it is enough to use.

image

0400H avatar Jan 06 '23 06:01 0400H

The problem seems to be the React component not producing "update commands".

When I remove the if block on lines 43-41 of get_update_cmds (https://github.com/cs01/gdbgui/blob/master/gdbgui/src/js/Registers.tsx#L34-L41) I get register values in the frontend. I don't I understand the back-and-forth between the frontend, server, and gdb well enough to propose a PR, but...

I think the condition is wrong: it's comparing store.get("inferior_program") to -1, but I think the intent is:

    if ( store.get("inferior_program") == constants.inferior_states.paused
        || store.get("inferior_program") == constants.inferior_states.running ) {
      return cmds;
    }

Even with that change: my inferior_program is "paused" when I'm sitting at a breakpoint, so the condition will still be true and stop the function there.

Is it possible the condition is backwards: we should get the register values if the inferior program is running or paused, but not in other cases?

gregbaker avatar Jan 24 '23 17:01 gregbaker

If my suspicion about the condition being inverted is correct, my commit to fix it is: https://github.com/gregbaker/gdbgui/commit/eddf5e056e689226ba6de79e15f797818a03cfe6

gregbaker avatar Jan 24 '23 17:01 gregbaker

@gregbaker I cannot build the executable from source. When I run the executable it's stuck on "Loading application". This issue doesn't happen when running the built binary from pipx.

Has this happen to you? I couldn't find too much information regarding building from source.

image

suka97 avatar Jun 03 '23 21:06 suka97