mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add more debug flags for GCC based compilers
We can use `#define`-ed macros in GDB with `-g3` flag. We can run code step by step in GDB with `-O0` flag.
This commit is contained in:
@@ -94,7 +94,12 @@ module MRuby
|
||||
end
|
||||
|
||||
def enable_debug
|
||||
compilers.each { |c| c.defines += %w(MRB_DEBUG) }
|
||||
compilers.each do |c|
|
||||
c.defines += %w(MRB_DEBUG)
|
||||
if toolchains.any? { |toolchain| toolchain == "gcc" }
|
||||
c.flags += %w(-g3 -O0)
|
||||
end
|
||||
end
|
||||
@mrbc.compile_options += ' -g'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user