Skip to content

Commit 93c3f2a

Browse files
committed
MINOR: debug: place the post_mortem struct in its own section.
Placing it in its own section will ease its finding, particularly in gdb which is too dumb to find anything in memory. Now it will be sufficient to issue this: $ gdb -ex "info files" -ex "quit" ./haproxy core 2>/dev/null |grep _post_mortem 0x0000000000cfd300 - 0x0000000000cfe780 is _post_mortem or this: $ objdump -h haproxy|grep post 34 _post_mortem 00001480 0000000000cfd300 0000000000cfd300 008fc300 2**8 to spot the symbol's address. Then it can be read this way: (gdb) p *(struct post_mortem *)0x0000000000cfd300
1 parent 989b02e commit 93c3f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct post_mortem {
156156
*/
157157
uint nb_components; // # of components below
158158
struct post_mortem_component *components; // NULL or array
159-
} post_mortem ALIGNED(256) = { };
159+
} post_mortem ALIGNED(256) HA_SECTION("_post_mortem") = { };
160160

161161
unsigned int debug_commands_issued = 0;
162162

0 commit comments

Comments
 (0)