This discussion is archived
3 Replies Latest reply: Apr 1, 2011 11:52 AM by IvanIgorovich RSS

Help to use dbx to find the info about main_arena

851262 Newbie
Currently Being Moderated
I have an multi-threaded application which uses ptmalloc2 for memory allocation and crashed with a core file. I want to verify the memory arena for that core file.

When I loaded the core in dbx and printed the address of the main_arena, it works fine with following result:

(dbx) print &main_arena
&``malloc.c`main_arena = 0xff398590

main_arena is defined in malloc.c with data type struct malloc_state.

I want to print the malloc_state structure with type casting the above address to (struct malloc_state *) 0xff398590 e.g.

(dbx) print (struct ``malloc.c`malloc_state *)0xff398590

But dbx gives following error:
dbx: struct "malloc_state" is not defined in malloc.o

Can anybody help here to get the structure values right?

Thanks in advance.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points