Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to enter gdb commands in debug terminal #642

Closed
tim37021 opened this issue Apr 17, 2017 · 5 comments
Closed

Is it possible to enter gdb commands in debug terminal #642

tim37021 opened this issue Apr 17, 2017 · 5 comments

Comments

@tim37021
Copy link

OS: Elementary OS Loki(Ubuntu 16.04)
VSCODE: 1.11.2
CPP EXTENSION: 0.10.5

I am able to debug the embedding system remotely(arm-none-eabi-gdb).
I would like to enter some gdb commands to dump memory or register values.
however the debug terminal can only view variable values.

info breakpoints
-var-create: unable to create variable object
i
10000

@pieandcakes
Copy link
Contributor

@tim37021 if you preface them with -exec then it will work. so in your example it would be -exec info breakpoints.

@HackerBaloo
Copy link

HackerBaloo commented Jan 30, 2018

What can you do without -exec?
Could -exec be the default for what happens in the debug console perhaps. It would make it much easier to transit into VSCode from gdb.

@pieandcakes
Copy link
Contributor

@HackerBaloo That would be nice, but VSCode uses it to do local variable parsing too. This is a special passthrough we had to add that when -exec is specified, that we would know to pass the command through without processing to gdb.

@HackerBaloo
Copy link

HackerBaloo commented Jan 31, 2018 via email

@WardenGnaw
Copy link
Member

Duplicate of #106

@WardenGnaw WardenGnaw marked this as a duplicate of #106 Sep 20, 2018
asialasr pushed a commit to asialasr/vscode-cpptools that referenced this issue Mar 12, 2021
…n it's in anonymous union) visualization when natvis file is specified. (microsoft#642)

For ex.,
class TestClass
{
public:
    union
    {
        int myValue;
    };
};
TestClass ss;
and natvis file would look like
	<Type Name="TestClass">
		<Expand>
			<Item Name="[Value]">myValue</Item>
		</Expand>
	</Type>

Previously MiEngine would send a command like this to GDB
-var-create - * "(((ss).<anonymous union>).myValue)" which will result in  -var-create: unable to create variable object

Now, it will do

-var-create - * "((ss).myValue)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants