diff options
| author | Lei YU <mine260309@gmail.com> | 2016-11-11 03:41:03 +0800 |
|---|---|---|
| committer | Lei YU <mine260309@gmail.com> | 2016-11-11 03:41:03 +0800 |
| commit | 246fc99410e637e34677260b06ab435da884bdf8 (patch) | |
| tree | b6c1416c8915c9296d0193c5ffe18e5a59af7a4d | |
| parent | f6b9fe0eeed77355c08886fc41abd608426657e9 (diff) | |
| download | openbmc-docs-246fc99410e637e34677260b06ab435da884bdf8.tar.gz openbmc-docs-246fc99410e637e34677260b06ab435da884bdf8.zip | |
cheatsheet.md: Add GDB and coredump tips
Change-Id: I5d274525aa34f20606454b8f7f5ccfca99ba5640
Signed-off-by: Lei YU <mine260309@gmail.com>
| -rw-r--r-- | cheatsheet.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cheatsheet.md b/cheatsheet.md index 69735f2..9efbb18 100644 --- a/cheatsheet.md +++ b/cheatsheet.md @@ -156,3 +156,27 @@ Power on: ``` curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data": []}' https://palm5-bmc/org/openbmc/control/chassis0/action/powerOn ``` + +## GDB + +[SDK build](#building-the-openbmc-sdk) provides GDB and debug symbols: + +* `$GDB` is available to use once SDK environment is setup +* Debug symbols are located in `.debug/` directory of each executable + +To use GDB: + +1. Setup SDK environment; +2. Run below GDB commands: + ``` + cd <sysroot_of_sdk_build> + $GDB <relative_path_to_exeutable> <path_to_core_file> + ``` + +## Coredump + +By default coredump is disabled in OpenBMC. To enable coredump: +``` +echo '/tmp/core_%e.%p' | tee /proc/sys/kernel/core_pattern +``` + |

