NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP not able to load dbg.so


Joined: 26 Jul 2004
Posts: 5
Reply with quote
I finally managed to make dbg.so by adding #include <netbd.h> in dbg_cmd.c on my up-to-date Debian machine and followed the INSTALL guidelines to the point, i.e. copied dbg.so into the extension folder, edited php.ini, ...

However, when I run

$ php -i

PHP unsuccessfully tries to load dbg.so for some *minutes* while locking up the computer.

What's going on?

Regards, Ralf
View user's profileFind all posts by chesswebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
first look at the message given and check if full filename is correct.
then try to explore the dbg.so you have compiled.
first check nm dbg.so to see what symbols are resolved and what are not.
then check ldd -v dbg.so
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Jul 2004
Posts: 5
Reply with quote
There is no usable message, $php -i just says' killed' after some time and quits.

Now, doing '$ nm dgb.so' yields this output:

0000c170 T add_rawdata
00008600 T add_session_cookie
0000a730 T add_var_hash
U _array_init
00004510 T back_trace_dtor
0000c4f0 T bp_array_add
0000d130 T bp_array_clear
0000c570 T bp_array_cmp
0000c5e0 T bp_array_find
0000c490 T bp_array_free
0000c590 T bp_array_sort
000044b0 T bp_dtor
0000c410 T bp_no_cmp
0000e92c A __bss_start
000042f0 t call_gmon_start
0000ca20 T chk_hit_bp
00005d20 T chk_scan_post
00008c20 T chk_session_request
00005e50 T chk_session_request_post
U close@@GLIBC_2.0
0000e440 D cmdlist
00005c30 T cmp_ext
000063a0 T cmpll
U compiler_globals
0000e940 b completed.1
U connect@@GLIBC_2.0
0000e4d0 D context_columns
U convert_to_boolean
U convert_to_long
U _convert_to_string
00006550 T create_debugger_socket
0000e5f0 d __CTOR_END__
0000e5ec d __CTOR_LIST__
000045d0 T ctx_dtor
000045c0 T ctxlines_dtor
U __ctype_b_loc@@GLIBC_2.3
U __ctype_tolower_loc@@GLIBC_2.3
w __cxa_finalize@@GLIBC_2.1.3
00008090 T dbg_ack_loop
00005180 T dbg_activate
0000cd20 T dbg_add_bp_reply
000076e0 T dbg_add_version_reply
00005c10 T dbg_api_no_check
00009070 T dbg_checkpausereq
0000d140 T dbg_chk_bp_hits
0000e408 D dbg_compat_info
000051e0 T dbg_deactivate
0000c6a0 T dbg_do_resolve_bp
00004f90 T dbg_error_cb
00005a40 T dbg_fcall_begin_handler
00005b70 T dbg_fcall_end_handler
000067d0 T dbg_findmodule
000082a0 T dbg_flush_log
00007900 T dbg_full_eval
0000e340 D dbg_functions
00007840 T dbg_get_context_sym_table
0000e960 B DBG_globals
00007ea0 T dbg_handle_request
0000cda0 T dbg_llist_sort
000063c0 T dbg_lookup_hostname
0000cba0 T dbg_mark_del_temp_breakpoints
000091c0 T dbg_mod_item_by_name
00009210 T dbg_mod_item_by_no
00009290 T dbg_mod_name_by_no
0000e3c0 D dbg_module_entry
0000e944 b dbg_module_id
00005790 T dbg_onsessfailed
00005bf0 T dbg_op_array_ctor
00005c00 T dbg_op_array_dtor
00005240 T dbg_op_array_handler
0000b960 T dbg_packet_add_frame
0000c230 T dbg_packet_add_rawdata
0000c270 T dbg_packet_add_stringlen
0000b890 T dbg_packet_clear
0000bbe0 T dbg_packet_findfirstframe
0000bc20 T dbg_packet_findnextframe
0000c2e0 T dbg_packet_findrawdata
0000bb90 T dbg_packet_firstframe
0000b840 T dbg_packet_free
0000b810 T dbg_packet_new
0000bbb0 T dbg_packet_nextframe
0000c070 T dbg_packet_recv
0000beb0 T dbg_packet_recv_body
0000bc90 T dbg_packet_send
0000b8b0 T dbg_packet_update_limit
00007f60 T dbg_process_ack
0000c8b0 T dbg_rebuild_bplist
0000c7e0 T dbg_rebuild_bplist_mod
0000d210 T dbg_reset_bp_isunderhit
0000c770 T dbg_resolve_bp
000081b0 T dbg_send_command
000093d0 T dbg_send_error
000083a0 T dbg_send_log
00008d80 T dbg_send_sid
00009320 T dbg_send_std_action
0000a590 T dbg_serialize_hash
0000a510 T dbg_serialize_zval
0000ce70 T dbg_set_breakpoint
00005120 T dbg_shutdown
0000ba00 T dbg_sock_read
00008e00 T dbg_start_session
00005080 T dbg_startup
000058a0 T dbg_statement_handler
000062f0 T dbg_step
00008fb0 T dbg_stop_session
00004b30 T dbg_store_prof_data
0000a860 T dbgTESTTIMER
0000b800 T dbgTimeFreq
0000b7a0 T dbgTimeTicks
00004ca0 T dbg_ub_write
U display_ini_entries
0000d270 t __divdi3
0000d400 t __do_global_ctors_aux
00004320 t __do_global_dtors_aux
0000e000 d __dso_handle
0000e5f8 d __DTOR_END__
0000e5f4 d __DTOR_LIST__
0000e524 A _DYNAMIC
0000e92c A _edata
U _efree
U _emalloc
0000ead0 A _end
U _erealloc
U __errno_location@@GLIBC_2.0
U _estrdup
U _estrndup
U executor_globals
0000e418 D extension_version_info
U fclose@@GLIBC_2.1
U feof@@GLIBC_2.0
U ferror@@GLIBC_2.0
0000c440 T find_bp_item_by_no
0000d440 T _fini
U fopen@@GLIBC_2.1
U fprintf@@GLIBC_2.0
000043a0 t frame_dummy
0000e520 r __FRAME_END__
U fread@@GLIBC_2.0
U fseek@@GLIBC_2.0
U ftell@@GLIBC_2.0
U get_active_function_name
U gethostbyname@@GLIBC_2.0
000062d0 T get_module
00006420 T get_redirected_address
U gettimeofday@@GLIBC_2.0
0000e600 A _GLOBAL_OFFSET_TABLE_
w __gmon_start__
00007020 T handler_add_bpl_reply
000079e0 T handler_add_eval_reply
00006f50 T handler_add_mod_list_reply
00007300 T handler_add_profdata_reply
00007430 T handler_add_proffreq_reply
00007760 T handler_add_sid_reply
00006940 T handler_add_source_reply
000071f0 T handler_add_srcctxinfo_reply
00007120 T handler_add_srclinesinfo_reply
00006cb0 T handler_add_stack_reply
000077f0 T handler_add_ver_reply
000070e0 T handler_set_breakpoint
00007e10 T handler_set_options
000086f0 T hex2digits_toi
000043e0 t __i686.get_pc_thunk.bx
0000638e t __i686.get_pc_thunk.cx
U inet_aton@@GLIBC_2.0
0000e020 d ini_entries
00003820 T _init
0000a990 T init_rslt_array
0000e948 b is_dbg_ext_started
0000e5fc d __JCR_END__
0000e5fc d __JCR_LIST__
w _Jv_RegisterClasses
0000a3a5 t .L116
00009a59 t .L130
00009d86 t .L152
00009e2f t .L157
00004465 t .L43
0000447c t .L44
00004485 t .L45
0000448e t .L46
00004497 t .L47
0000987e t .L66
000098df t .L71
00009988 t .L76
0000a07a t .L82
0000cc10 T listout_bp_item
00006780 T MATCHFILE
U memcpy@@GLIBC_2.0
U memset@@GLIBC_2.0
00004560 T mod_list_dtor
000048e0 T module_cleanup
0000e4c8 D module_columns
00004d20 T on_dbg_error_cb
00005590 T on_dbg_statement_handler
00004c30 T on_dbg_ub_write
U OnUpdateInt
000043f0 t on_update_JIT_level
U OnUpdateString
0000e950 b orig_sapi_module_ub_write
0000e94c b orig_zend_error_cb
0000e004 d p.0
00008860 T parse_session_request
0000eacc B pDBG_globals
00004630 T php_dbg_clearruntimeglobals
000046e0 T php_DBG_init_globals
00004b10 T php_DBG_uninit_globals
U php_info_print_table_end
U php_info_print_table_row
U php_info_print_table_start
U php_printf
U _php_stream_open_wrapper_as_file
0000e4b0 D profdata_columns
U qsort@@GLIBC_2.0
U recv@@GLIBC_2.0
U sapi_add_header_ex
U sapi_globals
U sapi_module
U select@@GLIBC_2.0
U send@@GLIBC_2.0
000094b0 T serialize_hash
00009630 T serialize_zval
U _setjmp@@GLIBC_2.0
U snprintf@@GLIBC_2.0
U socket@@GLIBC_2.0
U sprintf@@GLIBC_2.0
0000e4dc D srcline_columns
U stderr@@GLIBC_2.0
U strcasecmp@@GLIBC_2.0
U strchr@@GLIBC_2.0
U strcmp@@GLIBC_2.0
U strerror@@GLIBC_2.0
U strlen@@GLIBC_2.0
U strncpy@@GLIBC_2.0
U __strtol_internal@@GLIBC_2.0
0000c370 T SysError
000087b0 T urldecode
U vsnprintf@@GLIBC_2.0
U _zend_bailout
U zend_error_cb
U zend_eval_string
0000e2c0 D zend_extension_entry
U zend_extensions
U zend_get_compiled_filename
U zend_get_compiled_lineno
U zend_get_executed_filename
U zend_get_executed_lineno
U zend_get_extension
U zend_get_parameters
U zend_get_parameters_ex
U zend_hash_add_or_update
U zend_hash_destroy
U zend_hash_find
U zend_hash_get_current_data_ex
U zend_hash_get_current_key_ex
U zend_hash_index_update_or_next_insert
U zend_hash_init
U zend_hash_internal_pointer_reset_ex
U zend_hash_move_forward_ex
U zend_hash_num_elements
U zend_ini_boolean_displayer_cb
U zend_is_compiling
U zend_is_executing
U zend_llist_add_element
U zend_llist_del_element
U zend_llist_destroy
U zend_llist_init
U zend_register_extension
U zend_register_ini_entries
U zend_rsrc_list_get_rsrc_type
U zend_set_timeout
U zend_unregister_ini_entries
U zend_unset_timeout
U zend_wrong_param_count
0000b0b0 T zif_dbg_get_all_contexts
0000ada0 T zif_dbg_get_all_module_names
0000b410 T zif_dbg_get_all_source_lines
0000b300 T zif_dbg_get_context_name
0000af70 T zif_dbg_get_module_name
0000aa60 T zif_dbg_get_profiler_results
0000b670 T zif_dbg_get_source_context
00006130 T zif_debugbreak
00006210 T zif_outputdebugstring
00005ee0 T zm_activate_dbg
00005fb0 T zm_deactivate_dbg
00005fe0 T zm_info_dbg
00005cb0 T zm_shutdown_dbg
00005c50 T zm_startup_dbg
U _zval_copy_ctor
U _zval_dtor

Doing '$ ldd -v dbg.so' yields this output:

libc.so.6 => /lib/libc.so.6 (0x40021000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Version information:
./dbg.so:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2


I hope you can make sense of that.

Ralf
View user's profileFind all posts by chesswebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Do you use OS-supplied php binaries ? If so, I'd recommend you compile php from the official sources. I have never experienced any problems like yours.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PHP not able to load dbg.so
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic