2007-11-06 Jim Ingham * Makefile: Pass "-arch ppc" to the final link stage. 2007-03-02 Jim Ingham * Makefile: Use install rather than "cp -p" since the latter has started preserving the user, which is causing verification failures. 2006-10-30 Jim Ingham From Ira: 2006-08-21 Ira Ruben * MacsBug.h: Changed copyright date. (hex_string): Deleted. (comm_max): New field for DisasmData. (DISASM_PC_AREA): New flag for DisasmData. (curr_function): Deleted extern. (macsbug_generation): New counter for run, attach, etc. commands. (show_selectors): New switch for new SET mb-objc-selectors. (comment_insns): New switch for new SET mb-comment-insns. * MacsBug_display.c: Changed copyright date. (pc_wrap): New static global to diefine max pc area length. (write_to_history_area): Recompute len after detabbing line. (info registers fails without this). (display_pc_area): Delay "x/0i" until we need it . Use newly added pc_wrap instead of (max_cols - pc_left). Set new disasm_info.comm_max DisasmData value. Set DISASM_PC_AREA flag. (save_stack): Added arg to gdb_read_memory_from_addr call. (__display_side_bar): Ditto. (define_macsbug_screen_positions): Correct comment. Set pc_wrap. (refresh): Removed CLEAR_LINE from MacsBug screen prompts because it causes the input line to be erased when backspacing over the first char of input (if line is long enough -- why only the first is a mystery). But it appears we can live without the CLEAR_LINE. (update_macsbug_prompt): Ditto. (my_raw_input_prompt_setter): Ditto. (macsbug_off): Reversed order of gdb_close_output() calls. * MacsBug_patches.c: Changed copyright date and fixed some formatting. (macsbug_generation): New "timer" for run, attach, etc. commands. (run_command): Increment new macsbug_generation "timer". (new_breakpoint): Changed format for long long value. * MacsBug_plugins.c: Changed copyright date. (so_and_si): Fixed typo in comment. (init_from_gdb): Fix to not return value from void function. * MacsBug_set.c: Changed copyright date. (show_selectors): Added for SET mb-objc-selectors. (comment_insns): Added for SET mb-comment-insns. (selector_args): Added for SET mb-objc-selectors. (insns_args): Added for SET mb-comment-insns. (macsbug_set): Added period at end of all display messages. (update_pc_area): New function to update pc-area. (set_gdb_demangle): Call update_pc_area. (set_wrap): Confirmation message changed. (set_objc_selector): Added for SET mb-objc-selectors. (set_insns_comments): Added for SET mb-comment-insns. (DITTO_DESCRIPTION): Added period at end of help message. (UNMANGLE_DESCRIPTION): Ditto. (ECHO_DESCRIPTION): Ditto. (WRAP_DESCRIPTION): Reworded to cover asm lines. (SOSI_DESCRIPTION): Added period at end of help message. (DX_DESCRIPTION): Ditto. (SIDEBAR_DESCRIPTION): Ditto. (SELECTOR_DESCRIPTION): Added for SET mb-objc-selectors. (INSNS_DESCRIPTION): Added for SET mb-comment-insns. (TAB_DESCRIPTION): Added period at end of help message. (PC_AREA_DESCRIPTION): Ditto. (CMD_AREA_DESCRIPTION): Ditto. (HISTORY_DESCRIPTION): Ditto. (HEXDUMP_WIDTH_DESCRIPTION): Ditto. (HEXDUMP_GROUP_DESCRIPTION): Ditto. (set_arch): Added period at end of all display messages. (TESTING_DESCRIPTION): Added period at end of help message. (SET_ARCH_DESCRIPTION): Ditto. (init_macsbug_set): Restored for_set_and_show arg. Added SET mb-objc-selectors command. Added SET mb-comment-insns command. * MacsBug_testing.i: Changed copyright date. Added test to debug string_for_ptr and experiment with object file operations. Added tests to validate changed SET/SHOW code. * MacsBug_utils.c: Changed copyright date. Added #include (curr_function1): Was curr_function. (curr_function2): Current function name in pc-area. (env_MACSBUG_COMMENT_INSNS): Environment variable setting. (is_printable_string): New routine to comment selected insns. (is_objc_class): Ditto. (is_const_string_object): Ditto. (string_for_ptr): Ditto. (string_for_value): Ditto. (no_reg): Ditto; (try_to_comment_insn): Ditto. (format_disasm_line): Reworked to treat comments distinctly and added display of objc selector at PC. Also added experimental code to display strings for addresses on selected instructions. Also fixed a infinite loop trying to parse nested '<' and '>'s. (__disasm): Added line trunction subject to SET mb-wrap command. Set new disasm_info.comm_max DisasmData value. (__printf_stderr): Reversed order of gdb_close_output() calls. (__reset_current_function): Reset curr_function1, curr_function2. * Makefile: Changed copyright date. (VERSION): 1.6 (PRIVATE_BUILD): New make obtion to build in private directory. (FIXUP): New macro defining build rules to sudo chgrp procmod. and added to the link step. (debug): New target to build in a private directory outside of gdb's directories and handle setgid. (private): Ditto. * ChangeLog: Added missing changes for 2005-09-14 and moved Klee's gdb_plugin_support 2005-06-15 changes from here to the gdb_plugin_support ChangeLog. Aded missing 2005-09-14 Ira Ruben changes. * README.txt: Updated first paragraph and summarize 1.6 changes. * README.html: Ditto. * cp_macsbug - someone changed this script but it still needed fixing and made more general (I assume someone changed it because they actually used it). 2006-07-11 Jason Molenda (jmolenda@apple.com) * Makefile: Build with the pre-conformance header file mode to be consistent with gdb. 2006-04-17 Jason Molenda (jmolenda@apple.com) * Makefile: Make the MacsBug plugin setgid procmod. 2006-02-16 Stan Shebs * MacsBug_cmdline.c (define_colon): Fix handling of pre-run case. 2006-01-26 Jim Ingham * Macsbug_plugin.c (init_from_gdb): Check the return value from gdb_initialize. 2005-09-14 Ira Ruben * MacsBug_display.c (save_stack) Replaced gdb_read_memory() call with gdb_read_memory_from_addr(). (__display_side_bar): Ditto. 2005-07-25 Ira Ruben * MacsBug.h: Changed copyright date. (DisasmData): addr and pc now declared as GDB_ADDRESS. (restore_current_prompt): New extern. (fix_pc_area_if_necessary): Ditto. (my_raw_input_prompt_setter): Ditto. (define_macsbug_screen_positions): Ditto. (target_arch): New extern for 32/64 bit support. (DEFAULT_TARGET_ARCH): New #define for 32/64 bit support. (current_pc_lines): Removed extern. (find_breakpt): find_breakpoint renamed, arg now GDB_ADDRESS. (force_arch): New extern for 32/64 bit support. * MacsBug_cmdline.c: Changed copyright date. (colon_filter): Changes for 64 bit support but also the entire function is conditioned out. (define_colon): Use gdb_get_function_start() to get function start to define $colon. (preprocess_commands): Added DLL, FLL, SLL. Added comments. (postprocess_commands): Now used to set $__prevcmd__. * MacsBug_display.c: Changed copyright date. Fixed various formatting and comments. (target_arch): New 32/64 bit arch. control switch. (current_pc_lines) Now declared static. (curApName): Made static global. (previous_pc): Defined as GDB_ADDRESS. (prev_pc): Ditto. (prev_lr): Ditto. (prev_ctr): Ditto. (prev_xer): Ditto. (prev_mq): Ditto. (prev_msr): Ditto. (prev_gpr): Ditto. (curApName_title): New static for use in side bar. (side_bar_blanks): New static to define side-bar blank line. (sd): Forward static declaration moved. (position_cursor_for_shell_input): Moved to avoid static decl. (pgu): Call new gdb_get_long instead of gdb_get_int. (pgd): Ditto. (log_): Renamed log to avoid name conflict compiler warning. (write_to_history_area): Always flush (but keep old code). (display_pc_area): addr and current_pc defined as GDB_ADDRESS. Removed extra space in "Not Running" string. Handle case of gdb_get_register($pc) failure. (get_CurApName): Use pid if no app name. Widths of strings created here is the width of the current side-bar. (save_all_regs): $mq commented out + some reordering. (__display_side_bar): Changed and added intro comments. Register values now defined as GDB_ADDRESS except cr and xer is a special case where only the low-order 32 bits are shown. "CurApName" can now also be "PID". Alternate formatting for 64-bit arch. (define_macsbug_screen_positions): side_bar_right for 64-bit. Set value for side_bar_blanks. Set need_CurApName to force refresh of CurApName in side-bar. (restore_current_prompt): New routine for signal recovery. (fix_pc_area_if_necessary): Moved here from MacsBug_patches.c. (position_history_prompt): New special event routine. (filter_keyboard_characters): Conditioned out. (my_prompt_position_function): Updated comments. (my_raw_input_prompt_setter): New hook routine. (my_raw_input_handler): Change for raw input prompt handling. (macsbug_on): Enable position_history_prompt special event. (macsbug_off): Disable position_history_prompt special event. (init_macsbug_display): Avoid "log" name conflict. Placeholder for "set use-cached-symfiles 0". * MacsBug_patches.c: Changed copyright date. (bkpt_tbl): Defined as GDB_ADDRESS pointer. (gdb_commands_command): COMMANDS intercept. (target_is_running): New state switch. (my_signal_handler): Call restore_current_prompt() for SIGCONT and SIGWINCH. Also, for SIGCONT, raise(SIGINT) to stop execution to keep display and prompt correct. (run_command): Init $dot with gdb_set_address(). Remove $__next_addr__. (enhanced_gdb_listing_cmd): Skip a line or don't back up over prompt if same command as previous but with explict arg(s). (CAUSES_PROGRESS_CMD_PLUGIN): Additions for 64-bit arch and set $__lastcmd__ to -1. (CONTROL_CMD_PLUGIN): Call gdb_set_raw_input_prompt_handler() and set $__lastcmd__ to -1. (commands_command): New COMMANDS intercept routine. (bsearch_compar_bkpt): Compare GDB_ADDRESS values. (find_breakpt): Renamed to avoid gdb name conflict. Addresses are now GDB_ADDRESS types. (fix_pc_area_if_necessary): Moved to MacsBug_display.c. (qsort_compar_bkpt): Addresses are now GDB_ADDRESS types. (new_breakpoint): Ditto. (delete_breakpoint): Ditto. (changed_breakpoint): Ditto. (state_changed): fprintf's commented, set target_is_running. (init_macsbug_patches): Set gdb_commands_command and fix setting of wrong variable. Enable Gdb_State_Changed hook. * MacsBug_plugins.c: Changed copyright date. Some code rearrangement to avoid needless forward statics. (back_up_over_prompt): The addr is typed as GDB_ADDRESS. (db_dw_dl_dll): Renamed db_dw_and_dl and added DLL. The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Fixed some display problems. (db): Call db_dw_dl_dll(). (dl): Ditto. (dll): New function to display 64-bit values. (dm): The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Added "LongLong", "SignedLongLong", "Binary64" basic types. (dma): The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. (dp): Ditto. (dv): Fixed copyright display. (dw): Call db_dw_dl_dll(). (fill): The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Allow 8-byte fills. (find): The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Executes FUTURE (BREAK) for F command that is not a FIND. Allow 8-byte finds (for FLL). Fixed bug in byte finds which did't work for values >= 0x80. (f): New Stub to intercept the F abbreviation so that F can be overloaded as an abbreviation for FIND and FUTURE BREAK. (fll): New command (function) for 8-byte finds. (id): The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Output blank line between adjacent ID commands. (il): Ditto. (ip): Ditto. (pc): Moved after rn() to avoid needless forward static decl. (sb_sw_sl_sll_sm): Renamed sb_sw_sl_and_sm and added SLL. The addr is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. Update pc area. (sb): Call sb_sw_sl_sll_sm(). (sc): Output blank line between adjacent SC commands. (so_and_si): The pc is typed as GDB_ADDRESS and gdb_set_address() and gdb_get_address() used to manipulate address variables. (sl): Call sb_sw_sl_sll_sm(). (sll): New command for 8-byte memory setting. (sm): Call sb_sw_sl_sll_sm(). (sw): Call sb_sw_sl_sll_sm(). (td): Changed to support 32 and 64 bit archs. Removed MQ. (tf): Changed to call gdb_get_register() instead of gdb_get_int() to get $fpscr. Fixed formatting. (tv): Cahnfed to call gdb_get_register() instead of gdb_get_int() to get $vrsave. Fixed formatting. (wh): Added help info about displaying pathname and changed call to gdb_print_address(). (init_from_gdb): DLL, FLL, and SLL added. F added to be able to handle FIND and FUTURE disambiguation. * MacsBug_set.c: Changed copyright date. (force_arch): Manipulated by set_arch(). (new_arch): Ditto. (prev_arch): Ditto. (check_all_sets): Refresh pc area if set unmangle. (set_pc_area): Call define_macsbug_screen_positions(). (set_cmd_area): Ditto. (set_arch): New SET command (SET mb-arch [32|64]). (init_macsbug_set): Define SET mb-arch command. * MacsBug_testing.i: Changed copyright date. (testw): Added experiment to call gdb_testw(). * MacsBug_utils.c: Changed copyright date. (__asciidump): The addr is typed as GDB_ADDRESS. (__binary): Type of value changed to long long and gdb_get_long_long() called to get it. (branch_taken) gdb_get_register() to get cr. (format_disasm_line): Changed to handle possible addresses which could be >8 digits. (__disasm): The addr and limit are typed as GDB_ADDRESS. (__getenv): Allow for the possibility of long long values. (__hexdump): The addr is typed as GDB_ADDRESS. (__memcpy): Changed call from gdb_get_int() to gdb_get_long() for arg 2. (filter_char): Remove bolding from octal values. (__print_4): Changed call from gdb_get_int() to gdb_get_long() for arg. (__print_8): New routine to display 8-byte values as strings. * Makefile: Changed copyright date. (VERSION): 1.5 (BUILD_VERSION): 10.4 (OPT): Allow control of -O setting for "manual" builds. * README.txt: Updated to summarize 1.5 changes. * README.html: Ditto plus change gdb URL. * gdbinit-MacsBug: Changed copyright date. Fixed typeo in title box. 2005-06-15 Klee Dienes * MacsBug.h (find_breakpoint): Rename to find_breakpoint_for_address. * MacsBug_patches.c (find_breakpoint): Rename to find_breakpoint_for_address. * MacsBug_set.c (init_macsbug_set): Update calls to gdb_define_set. 2005-01-21 Jim Ingham * MacsBug_display.c: gcc 4.0 doesn't allow static function prototypes in a function body, so I moved the prototypes to before the function that used to contain it. * MacsBug_plugins.c: Ditto. * gdb_plugin_support/gdb_io_redirection.c: Ditto. * gdb_plugin_support/gdb_set.c: Ditto. 2005-01-06 Jim Ingham * MacsBug_display.c: Read all the registers into unsigned long long's (since we now treat ALL the PPC registers as unsigned long long, and then only print out the lower 32 bits for now. 2003-10-20 Ira Ruben * Makefile: Add OPT to control -O level from command line. VERSION set to 1.4. * MacsBug.h: Fix typeo in stream dcl in struct DisasmData. Declared current_pc_lines. * MacsBug_display.c: Define current_pc_lines. (disasm_pc): Fix comments, changed Disasm_pc_data struct. (display_pc_area): Always do "x/0i 0", use gdb_get_register instead of gdb_get_register, use x/Ni for N lines instead of doing one at a time, add extra line if no symbol shown. (save_stack): Use gdb_get_sp to get $sp and changed call to gdb_read_memory. (save_all_regs): Use gdb_get_register instead of gdb_get_int. (__display_side_bar): Use gdb_get_register instead of gdb_get_int, gdb_get_sp to get $sp, change gdb_read_memory call. * MacsBug_patches.c (fix_pc_area_if_necessary): Use gdb_get_register instead of gdb_get_int and fix bug in range checking. * MacsBug_plugins.c (tf): Change call to gdb_get_register(). (tv): Ditto. * MacsBug_testing.i (testb): Ditto plus some bug fixes. * MacsBug_utils.c (format_disasm_line): Remove call to gdb_internal_error, moved call to get_screen_size to fix bug with max_rows and max_cols being unitialized, bump addr in this routine instead of by caller. (__disasm): Always do "x/0i 0", use gdb_get_register instead of gdb_get_int, use x/Ni for N lines instead of doing one at a time. * README.html: Updated to summarize 1.4 changes. * README.txt: Ditto. 2003-08-22 Jim Ingham * Macsbug_patches.c (fix_pc_area_if_necessary): Call get_current_frame to make sure the deprecated_selected_frame gets set. 2002-09-24 Klee Dienes * Makefile (LDFLAGS): Disable link against -framework liberty. 2002-09-24 Klee Dienes * Makefile: Use (cd dir && command), not (cd dir; command).