gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the address of a variable in GDB?


From: Mohammad-Reza Nabipoor
Subject: Re: How to get the address of a variable in GDB?
Date: Fri, 4 Oct 2024 09:10:25 +0200

Hi Gaius.

On Fri, Oct 04, 2024 at 01:37:04AM +0100, Gaius Mulley wrote:
> Mohammad-Reza Nabipoor <mnabipoor@gnu.org> writes:
> 
> sure this is the correct place to ask the question.  This is a missing
> feature, I've just written a patch (for the development gdb) - and will
> post it to the gdb patch mailing list once I've rerun the testsuite.
> 


Cool!


> many thanks for the bug report.  In the meanwhile I guess an awful work
> around would be to:
> 
> (gdb) break _M2_hello_init
> (gdb) run
> (gdb) set lang c
> (gdb) print &foo
> 

Nice trick :)


Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]