[haiku-development] Debugger and dynamic arrays

  • From: Edward Robbins <edd.robbins@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 24 Mar 2013 12:24:01 +0000

Hi all,

I'm trying to use the debugger to view dynamic C arrays like

mytype* myvar;

The debugger only shows the first element in the array. I've tried
casting it by right clicking, selecting cast, and entering (supposing
it has size 8 currently) "mytype[8]", for example, but this doesn't
get me anywhere.

In gdb, I would do "p myvar[2]" and it works fine.

I'm somewhat hampered by the fact that gdb doesn't work quite right
either... it gives me the wrong line number by some 30 or so lines (as
far as I can tell) to the one where execution really stopped.

Is there any way to do this in the debugger?

This is on hrev45378 gcc2 hybrid, using gcc4.

Thanks,
Ed

Other related posts: