3 Replies Latest reply on Apr 1, 2011 6:52 PM by Ivanigorovich-Oracle

    Help to use dbx to find the info about main_arena

      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
      &`libptmalloc2.so`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 `libptmalloc2.so`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.