Basic expressions in GDB
Valentino Giudice
valentino.giudice96 at gmail.com
Thu Aug 1 03:24:30 UTC 2024
Hi all.
I am a newbie and this is my first time posting on a D forum.
I am using GDB on Linux, from Windows, trough WSL.
I am compiling using DMD (in debug mode), as this seems to give
better results than using GDC.
So far, I have failed to do the following:
- Create, from the debugger, a string. A sequence of characters
between quote is evaluated as a C-style array of chars.
- Call a function from the debugger with its name. Only
unintuitive mangled names can be used and the output has to be
cast in the proper type.
If I compile using GDC or LDC, then global variables inside a
module will have two names: "module.variable" and a mangled name.
They have to be cast when read and the "module.variable" name
needs to be accessed using single quotes around it, or it crashes.
When compiling with DMD this doesn't happen: global variables
only have the "module.variable" name, which can be read without
any cast and with or without single quotes.
What should I consider when writing expressions in the debugger?
Is there any way to write expression closer to the D syntax?
Thank you all in advance.
More information about the Digitalmars-d-debugger
mailing list