I was doing some prelanding tests and found a couple of problems:


1) __function does not work for x64 at least on my simple test:

function g () { return 1; }
function f () {
  var ret = 0;
  for (var i = 1; i < 10000000; i++) {
    ret += g ();
  }
  return ret;
}
f()

set breakpoint in g with b g
v8print __function

Printed some SMI for me.

2) It's a bit unhandy that we declare locals to be some pointer sized structure.
User can't use normal print to print their values. See comment below. Is it
intentional?

3) I am a bit concerned that abbrev generation and DebugInfoSection are not
glued together. This is completely unrelated to this CL but I think if we start putting more and more stuff there we'll suffer huge headache if we don't hide
them both under the same abstraction that writes both abbrevs and debug info
sections.


http://codereview.chromium.org/6995161/diff/6003/src/gdb-jit.cc
File src/gdb-jit.cc (right):

http://codereview.chromium.org/6995161/diff/6003/src/gdb-jit.cc#newcode1337
src/gdb-jit.cc:1337: w->WriteULEB128(DW_TAG_STRUCTURE_TYPE);
What about using DW_TAG_base_type with DW_ATE_address instead of
DW_TAG_STRUCTURE_TYPE?

I think this would allow GDB to produce something meaningfull when you
say "print __function" instead of just ().

It would be even better if we could hook type of locals to be
v8::internal::Object* but I can't grok how to do it just from DWARF2
spec. I'll ask Paul whether this is possible.

http://codereview.chromium.org/6995161/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to