[haiku-bugs] [Haiku] #12411: Debugger fails to build with APPS_DEBUGGER_TRACE_STACK_FRAME_LOCALS defined

  • From: "simonsouth" <trac@xxxxxxxxxxxx>
  • Date: Thu, 08 Oct 2015 13:17:00 -0000

#12411: Debugger fails to build with APPS_DEBUGGER_TRACE_STACK_FRAME_LOCALS
defined
--------------------------+------------------------------
Reporter: simonsouth | Owner: bonefish
Type: bug | Status: new
Priority: low | Milestone: Unscheduled
Component: Build System | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
--------------------------+------------------------------
Enabling `APPS_DEBUGGER_TRACE_STACK_FRAME_LOCALS` in
`build/user_config_headers/apps_debugger_config.h` and building the
debugger fails with


{{{
In file included from src/apps/debugger/value/ValueWriter.cpp:16:0:
src/apps/debugger/value/ValueWriter.cpp: In member function 'status_t
ValueWriter::WriteValue(ValueLocation*, BVariant&)':
src/apps/debugger/value/ValueWriter.cpp:95:47: error: 'bitSize' was not
declared in this scope
", bits: %" B_PRIu32 "\n", i, piece.reg, bitSize);
^
src/apps/debugger/Tracing.h:67:36: note: in definition of macro
'TRACE_LOCALS'
# define TRACE_LOCALS(x...) printf(x)
^
}}}

After fixing this (the last argument should pretty obviously be
`piece.bitSize`) the build fails again with

{{{
In file included from src/apps/debugger/value/ValueWriter.cpp:16:0:
src/apps/debugger/value/ValueWriter.cpp: In member function 'status_t
ValueWriter::WriteValue(ValueLocation*, BVariant&)':
src/apps/debugger/Tracing.h:67:37: error: format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'uint64 {aka long unsigned
int}' [-Werror=format=]
# define TRACE_LOCALS(x...) printf(x)
^
src/apps/debugger/value/ValueWriter.cpp:94:5: note: in expansion of macro
'TRACE_LOCALS'
TRACE_LOCALS(" piece %" B_PRId32 ": register: %" B_PRIu32
}}}

which makes sense because `piece.bitSize` [http://cgit.haiku-
os.org/haiku/tree/src/apps/debugger/types/ValueLocation.h#n35 is in fact]
a `uint64`.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12411>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: