Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How Can I print debug log message in stack.cc ?

92 views
Skip to first unread message

xianwei zheng

unread,
Jun 11, 2024, 6:12:21 PM6/11/24
to Chromium-dev
I include "base/logging.h" 

and try to print message use LOG(ERROR), It seems not the correct way to print log.


```
../../v8/src/heap/base/stack.cc:139:9: error: use of undeclared identifier 'ERROR'
  139 |     LOG(ERROR) << "seg start:." << segment.start << ", stack_align:0x" << std::hex << kMinStackAlignment;
      |         ^
1 error generated.

```

or 

```
In file included from ../../base/logging.h:17:
../../base/compiler_specific.h:98:9: error: 'ALIGNAS' macro redefined [-Werror,-Wmacro-redefined]
   98 | #define ALIGNAS(byte_alignment) alignas(byte_alignment)
      |         ^
../../v8/src/base/compiler-specific.h:135:9: note: previous definition is here
  135 | #define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
      |         ^
```

xianwei zheng

unread,
Jun 13, 2024, 10:50:04 AM6/13/24
to Chromium-dev, xianwei zheng

FIXED. 

I copy V8_Fatal to V8_Print , And remove *abort* API, It seems work.
Reply all
Reply to author
Forward
0 new messages