Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Using Code::Blocks
»
Why aren't #define'd constants known to debugger?
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Why aren't #define'd constants known to debugger? (Read 2465 times)
rogeriodec
Multiple posting newcomer
Posts: 50
Why aren't #define'd constants known to debugger?
«
on:
March 21, 2018, 11:16:30 pm »
Every time I try to watch a formula that uses a constant, the debugger shows "Not available in current context".
EX:
#define PI 3.14159265
... and watch "x * 180 / PI"...
How can this be solved?
Logged
Windows 8.1
SVN 11400
oBFusCATed
Developer
Lives here!
Posts: 13413
Re: Why aren't #define'd constants known to debugger?
«
Reply #1 on:
March 22, 2018, 12:31:26 am »
https://stackoverflow.com/questions/2934006/how-do-i-print-a-defined-constant-in-gdb?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
https://sourceware.org/gdb/onlinedocs/gdb/Macros.html
There is no UI for this and I doubt will provide one...
Use enums or proper constants...
Logged
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Using Code::Blocks
»
Why aren't #define'd constants known to debugger?