This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: status of Darwin support
Christian Thalinger wrote:
> I tried that before, but then I get the:
>
> Unable to find Mach task port for process-id 90603: (os/kern) failure (0x5).
> (please check gdb is setgid procmod)
>
> again. I just tried to run it as root, then it runs but the break does
> not work. I'm confused...
I was able to attach to the process. Here is the data:
(gdb) info locals
sect1 = (const struct obj_section *) 0x860430
sect2 = (const struct obj_section *) 0x867e30
sect1_addr = 7008
sect2_addr = 7106
__PRETTY_FUNCTION__ = "qsort_cmp"
(gdb) p *sect1->the_bfd_section
$1 = {
name = 0x85fa34 ".text",
id = 25,
index = 0,
next = 0x8614c4,
prev = 0x0,
flags = 283,
user_set_vma = 0,
linker_mark = 0,
linker_has_input = 0,
gc_mark = 0,
segment_mark = 0,
sec_info_type = 0,
use_rela_p = 0,
has_tls_reloc = 0,
has_tls_get_addr_call = 0,
has_gp_reloc = 0,
need_finalize_relax = 0,
reloc_done = 0,
vma = 7008,
lma = 7008,
size = 13427,
rawsize = 0,
relax = 0x0,
relax_count = 0,
output_offset = 0,
output_section = 0x0,
alignment_power = 2,
relocation = 0x0,
orelocation = 0x0,
reloc_count = 0,
filepos = 2912,
rel_filepos = 0,
line_filepos = 0,
userdata = 0x0,
contents = 0x0,
lineno = 0x0,
lineno_count = 0,
entsize = 0,
kept_section = 0x0,
moving_line_filepos = 0,
target_index = 0,
used_by_bfd = 0x0,
constructor_chain = 0x0,
owner = 0x63e0e0,
symbol = 0x85fa3c,
symbol_ptr_ptr = 0x8614a8,
map_head = {
link_order = 0x0,
s = 0x0
},
map_tail = {
link_order = 0x0,
s = 0x0
}
}
(gdb) p *sect1->objfile
$2 = {
next = 0x71e000,
name = 0x63dd70
"/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/gamma",
flags = 1,
symtabs = 0x0,
psymtabs = 0x0,
psymtabs_addrmap = 0x0,
free_psymtabs = 0x0,
obfd = 0x63e0e0,
gdbarch = 0x85d408,
mtime = 1249556492,
objfile_obstack = {
chunk_size = 4072,
chunk = 0x865e00,
object_base = 0x865ef8 "",
next_free = 0x865ef8 "",
chunk_limit = 0x866de8 "",
temp = 0,
alignment_mask = 3,
chunkfun = 0x183a90 <xmalloc>,
freefun = 0x182010 <xfree>,
extra_arg = 0x0,
use_extra_arg = 0,
maybe_empty_object = 0,
alloc_failed = 0
},
psymbol_cache = 0x63e010,
macro_cache = 0x63e190,
demangled_names_hash = 0x63e350,
global_psymbols = {
list = 0x0,
next = 0x0,
size = 0
},
static_psymbols = {
list = 0x0,
next = 0x0,
size = 0
},
msymbols = 0x8608e4,
minimal_symbol_count = 64,
msymbol_hash = {0x0 <repeats 30 times>, 0x86090c, 0x0, 0x0, 0x0, 0x0,
0x0, 0x860e84, 0x0 <repeats 28 times>, 0x8609d4, 0x0, 0x0, 0x0, 0x0,
0x860efc, 0x0, 0x0, 0x860ed4, 0x0 <repeats 22 times>, 0x860e0c, 0x0
<repeats 29 times>, 0x861014, 0x860f74, 0x0 <repeats 17 times>,
0x860fec, 0x0 <repeats 16 times>, 0x860c54, 0x0 <repeats 11 times>,
0x8610dc, 0x0 <repeats 38 times>, 0x8610b4, 0x0 <repeats 30 times>,
0x860f9c, 0x0 <repeats 42 times>, 0x860a24, 0x0, 0x860de4, 0x0 <repeats
12 times>, 0x860934, 0x0 <repeats 41 times>, 0x860984, 0x0 <repeats 45
times>, 0x86103c, 0x0 <repeats 11 times>, 0x861154, 0x0 <repeats 30
times>, 0x860c04, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x860bdc, 0x0
<repeats 19 times>...},
msymbol_demangled_hash = {0x0 <repeats 2039 times>},
sf = 0x29b460,
ei = {
entry_point = 7008
},
deprecated_sym_stab_info = 0x0,
deprecated_sym_private = 0x0,
data = 0x63de70,
num_data = 8,
section_offsets = 0x860484,
num_sections = 9,
sect_index_text = 0,
sect_index_data = -1,
sect_index_bss = -1,
sect_index_rodata = -1,
sections = 0x860430,
sections_end = 0x860484,
separate_debug_objfile = 0x0,
separate_debug_objfile_backlink = 0x0,
stats = {
n_minsyms = 64,
n_psyms = 0,
n_syms = 0,
n_stabs = 0,
n_types = 0,
sz_strtab = 0
},
cp_namespace_symtab = 0x0
}
(gdb) p *sect2->the_bfd_section
$3 = {
name = 0x8674d4 ".text",
id = 34,
index = 0,
next = 0x868ec4,
prev = 0x0,
flags = 311,
user_set_vma = 0,
linker_mark = 0,
linker_has_input = 0,
gc_mark = 0,
segment_mark = 0,
sec_info_type = 0,
use_rela_p = 0,
has_tls_reloc = 0,
has_tls_get_addr_call = 0,
has_gp_reloc = 0,
need_finalize_relax = 0,
reloc_done = 0,
vma = 0,
lma = 0,
size = 13329,
rawsize = 0,
relax = 0x0,
relax_count = 0,
output_offset = 0,
output_section = 0x868e14,
alignment_power = 0,
relocation = 0x0,
orelocation = 0x0,
reloc_count = 651,
filepos = 1344,
rel_filepos = 53004,
line_filepos = 0,
userdata = 0x0,
contents = 0x0,
lineno = 0x0,
lineno_count = 0,
entsize = 0,
kept_section = 0x0,
moving_line_filepos = 0,
target_index = 0,
used_by_bfd = 0x0,
constructor_chain = 0x0,
owner = 0x63e400,
symbol = 0x8674dc,
symbol_ptr_ptr = 0x868ea8,
map_head = {
link_order = 0x0,
s = 0x0
},
map_tail = {
link_order = 0x0,
s = 0x0
}
}
(gdb) p *sect2->objfile
$4 = {
next = 0x0,
name = 0x63e590
"/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/launcher.o",
flags = 1,
symtabs = 0x0,
psymtabs = 0x8799c8,
psymtabs_addrmap = 0x879a54,
free_psymtabs = 0x0,
obfd = 0x63e400,
gdbarch = 0x85d408,
mtime = 1248941544,
objfile_obstack = {
chunk_size = 4072,
chunk = 0x879400,
object_base = 0x879a7c "",
next_free = 0x879a7c "",
chunk_limit = 0x87a3e8 "",
temp = 0,
alignment_mask = 3,
chunkfun = 0x183a90 <xmalloc>,
freefun = 0x182010 <xfree>,
extra_arg = 0x0,
use_extra_arg = 0,
maybe_empty_object = 0,
alloc_failed = 0
},
psymbol_cache = 0x63e4d0,
macro_cache = 0x63e530,
demangled_names_hash = 0x63e6b0,
global_psymbols = {
list = 0x63eb70,
next = 0x63ebac,
size = 102
},
static_psymbols = {
list = 0x82d000,
next = 0x82d218,
size = 204
},
msymbols = 0x867e08,
minimal_symbol_count = 0,
msymbol_hash = {0x0 <repeats 2039 times>},
msymbol_demangled_hash = {0x0 <repeats 2039 times>},
sf = 0x29b460,
ei = {
entry_point = 4294967295
},
deprecated_sym_stab_info = 0x0,
deprecated_sym_private = 0x0,
data = 0x63e390,
num_data = 8,
section_offsets = 0x867e78,
num_sections = 17,
sect_index_text = 0,
sect_index_data = -1,
sect_index_bss = -1,
sect_index_rodata = -1,
sections = 0x867e30,
sections_end = 0x867e78,
separate_debug_objfile = 0x0,
separate_debug_objfile_backlink = 0x0,
stats = {
n_minsyms = 0,
n_psyms = 149,
n_syms = 0,
n_stabs = 0,
n_types = 0,
sz_strtab = 0
},
cp_namespace_symtab = 0x0
}
(gdb)
-- Christian