help understanding stack trace: "#0 0x00000000 in ?? ()"
I am attempting to debug an Android application that uses native C code. I was able to setup GDB and get a stack trace of where I am segfaulting. I understand the stack trace up until the top most item:
#0 0x00000000 in ?? ()
#1 0x84601920 in fvalue_set (fv=0xe262c0, value=0x494530cc, already_copied=0) at ftypes.c:422
#2 0x845eaae8 in proto_tree_new_item (new_fi=0xe262c0, tree=<value optimized out>, tvb=0xe29080, start=14, length=11, encoding_arg=0) at proto.c:1429
#3 0x845eb2f8 in proto_tree_add_item (tree=<value optimized out>, hfindex=<value optimized out>, tvb=0xe29080, start=14, length=11, encoding=0) at proto.c:1760
#4 0x84a163dc in add_tagged_field (pinfo=<value optimized out>, tree=0xe245b8, tvb=0xe29080, offset=<value optimized out>) at packet-ieee80211.c:6272
#5 0x84a18e74 in ieee_80211_add_tagged_parameters (tvb=0xe29080, offset=12, pinfo=0x10f8978, tree=0xe24588, tagged_parameters_len=190) at packet-ieee80211.c:7914
#6 0x84a19094 in dissect_ieee80211_mgt (fcf=<value optimized out>, tvb=0xe29080, pinfo=0x10f8978, tree=0xe21dc0) at packet-ieee80211.c:8064
#7 0x84a1a660 in dissect_ieee80211_common (tvb=0xe29048, pinfo=<value optimized out>, tree=<value optimized out>, fixed_length_header=<value optimize开发者_开发技巧d out>, fcs_len=0, wlan_broken_fc=0, datapad=-494833656, is_ht=Cannot access memory at address 0x3bc) at packet-ieee80211.c:9595
#8 0x84a1d388 in dissect_ieee80211 (tvb=0xe262c0, pinfo=0x494530cc, tree=0x0) at packet-ieee80211.c:9721
#9 0x845d6358 in call_dissector_work (handle=0x3df1c8, tvb=0xe29048, pinfo_arg=0x10f8978, tree=0xe21dc0, add_proto_name=1) at packet.c:395
#10 0x845d63d4 in call_dissector_only (handle=0xe262c0, tvb=0x494530cc, pinfo=0x0, tree=0x85b85d74) at packet.c:1826
#11 0x845d645c in call_dissector (handle=0xe262c0, tvb=0x494530cc, pinfo=0x0, tree=0x85b85d74) at packet.c:1839
#12 0x84c900a4 in dissect_radiotap (tvb=0xe29010, pinfo=<value optimized out>, tree=<value optimized out>) at packet-radiotap.c:1624
#13 0x845d6358 in call_dissector_work (handle=0x523ab8, tvb=0xe29010, pinfo_arg=0x10f8978, tree=0xe21dc0, add_proto_name=1) at packet.c:395
#14 0x845d6814 in dissector_try_uint_new (sub_dissectors=<value optimized out>, uint_val=23, tvb=<value optimized out>, pinfo=0x10f8978, tree=0xe21dc0, add_proto_name=1) at packet.c:898
#15 0x845d6848 in dissector_try_uint (sub_dissectors=0xe262c0, uint_val=1229271244, tvb=0x0, pinfo=0x85b85d74, tree=0xe21dc0) at packet.c:924
#16 0x8471453c in dissect_frame (tvb=<value optimized out>, pinfo=<value optimized out>, parent_tree=<value optimized out>) at packet-frame.c:354
#17 0x845d6358 in call_dissector_work (handle=0x360fe0, tvb=0xe29010, pinfo_arg=0x10f8978, tree=0xe21dc0, add_proto_name=1) at packet.c:395
#18 0x845d63d4 in call_dissector_only (handle=0xe262c0, tvb=0x494530cc, pinfo=0x0, tree=0x85b85d74) at packet.c:1826
#19 0x845d645c in call_dissector (handle=0xe262c0, tvb=0x494530cc, pinfo=0x0, tree=0x85b85d74) at packet.c:1839
#20 0x845d6710 in dissect_packet (edt=<value optimized out>, pseudo_header=0xbed5c3d0, pd=<value optimized out>, fd=<value optimized out>, cinfo=0x0) at packet.c:326
#21 0x80d033a0 in dissectPacket (pHeader=0x44740b70 "??]NSb\n", pData=0x4476e270 "", encap=23) at /Users/gnychis/Documents/workspace/CoexiSyst/jni/libwireshark/wireshark_helper.c:374
#22 0x80d034f4 in Java_com_gnychis_coexisyst_Packet_dissectPacket (env=0xaa50, thiz=0x44798bd0, header=0x44740b60, data=0x4476e260, encap=23) at /Users/gnychis/Documents/workspace/CoexiSyst/jni/libwireshark/wireshark_helper.c:431
What does the top most item being "#0 0x00000000 in ?? ()" actually mean? This seems to be NULL. Is this a lack of debug information, or is the segfault caused by a call to a null method? (i.e., a function at the address 0x0000000).
I am just trying to understand how to interpret this trace and the underlying cause of the segfault.
The code at #1, fvalue_set, is:
fv->ftype->set_value(fv, value, already_copied);
The code has called a subroutine at null address. Most probably set_value
is NULL.
精彩评论