aboutsummaryrefslogtreecommitdiff
path: root/ddb
Commit message (Collapse)AuthorAgeFilesLines
...
* ddb: use db_thread_stat to format the flagsJustus Winter2014-06-111-6/+2
| | | | | * ddb/db_print.c (db_print_thread): Use db_thread_stat to format the flags.
* ddb: print task names if availableJustus Winter2014-06-111-1/+6
| | | | | | * ddb/db_print.c (db_print_task): Print task name if available. * i386/i386/db_interface.c (db_task_name): Likewise. * i386/i386/db_machdep.h (DB_GNUMACH_TASK_NAME): Remove unused definition.
* ddb: add "halt" commandJustus Winter2014-05-031-0/+1
| | | | | | * ddb/db_command.c (db_command_table): Add "halt" command. * i386/i386/db_interface.h (db_halt_cpu): New declaration. * i386/i386at/model_dep.c (db_halt_cpu): New function.
* Convert from K&R to ANSIMarin Ramesa2014-04-0420-228/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert from K&R style function definitions to ANSI style function definitions. * ddb/db_access.c: Convert function prototypes from K&R to ANSI. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * device/blkio.c: Likewise. * device/chario.c: Likewise. * device/dev_lookup.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/loose_ends.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/phys.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/user_ldt.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/kd_queue.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/rtc.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/read_fault.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/exception.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/printf.c: Likewise. * kern/priority.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_emulation.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread_swap.c: Likewise. * kern/time_stamp.c: Likewise. * kern/timer.c: Likewise. * kern/xpr.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_user.c: Likewise.
* ddb: safely copy symbol names into the symtab structureJustus Winter2014-02-041-1/+2
| | | | | | | | | | Use strncpy instead of strcpy to copy the name of a symbol into the symtab structure. Make sure that the string is properly terminated. Found using Coverity. * ddb/db_sym.c (db_add_symbol_table): Use strncpy instead of strcpy, ensure string termination.
* Mark pure functions with attribute pureMarin Ramesa2013-12-209-11/+11
|
* ddb/db_watch.c (db_watchpoint_cmd): remove forward declarationMarin Ramesa2013-12-201-1/+0
| | | | * ddb/db_watch.c (db_watchpoint_cmd) (db_option): Remove forward declaration.
* Declare void argument lists (part 2)Marin Ramesa2013-12-202-3/+3
| | | | | | | | Declare void argument lists that were not declared in the first part of this patch and * kern/sched_prim.h (recompute_priorities): Fix prototype. * kern/startup.c (setup_main) (recompute_priorities): Fix call.
* Quiet GCC warning about uninitialized variableMarin Ramesa2013-12-161-1/+1
| | | | | * ddb/db_command.h (db_error): Mark with attribute noreturn. * i386/i386/setjmp.h (_longjmp): Likewise.
* ddb: qualify pointers whose dereferenced values are constant with constMarin Ramesa2013-12-1529-134/+135
|
* ddb/db_expr.c (db_mult_expr): initialize lhsMarin Ramesa2013-12-151-1/+1
| | | | | | Initialize lhs to zero to avoid uninitialized usage in db_unary(). * ddb/db_expr.c (db_mult_expr) (lhs): Initialize to zero.
* ddb/db_break.c (db_delete_cmd): remove unnecessary initializationMarin Ramesa2013-12-151-1/+1
| | | | | | | | Now that we have returns there are no more warnings from GCC about uninitialized variable. Remove unnecessary initialization of variable bkpt. * ddb/db_break.c (db_delete_cmd) (bkpt): Remove unnecessary initialization.
* ddb/db_break.c (db_find_breakpoint_here): remove unnecessary castsMarin Ramesa2013-12-151-1/+1
| | | | | | | Variable addr and member address are already of db_addr_t type which is type defined as vm_offset_t. * ddb/db_break.c (db_find_breakpoint_here) (DB_PHYS_EQ) (addr, address): Remove unecessary casts.
* Declare void argument listsMarin Ramesa2013-12-1514-28/+28
|
* ddb/db_trap.c (db_task_trap): remove forward declarationsMarin Ramesa2013-12-092-2/+2
| | | | | * ddb/db_break.h (db_check_breakpoint_valid): Add prototype. * ddb/db_trap.c (db_init_default_thread, db_check_breakpoint_valid): Remove forward declarations.
* Use db_addr_t instead of db_expr_tMarin Ramesa2013-12-094-8/+8
| | | | | | | | | | | | | | | | | | In this way everything falls into place and there is one cast less. Function db_task_printsym() is already always called with the cast to db_addr_t in the first argument. * ddb/db_aout.c (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t. (aout_db_search_by_addr): Don't cast to vm_offset_t. Argument is already db_addr_t. * ddb/db_aout.h (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t. * ddb/db_sym.c (db_task_printsym): Likewise. (db_line_at_pc): Likewise. * ddb/db_sym.h (db_task_printsym): Likewise. (db_line_at_pc): Likewise. * i386/i386/db_trace.c (db_task_printsym): Cast to db_addr_t instead of db_expr_t. Member swap_func is a pointer to void.
* ddb/db_print.c: use unsigned long instead of an unsigned intMarin Ramesa2013-12-091-1/+1
| | | | | | Variable db_maxoff is in other files declared as unsigned long. * ddb/db_print.c (db_maxoff): Use unsigned long instead of an unsigned int.
* ddb/db_mp.c: definition of db_console() only if CONSOLE_ON_MASTERMarin Ramesa2013-12-092-2/+6
| | | | | | | | | | Function db_console() is called only if CONSOLE_ON_MASTER. If it stays this way, db_console() will not compile. I don't know if it should be removed. Maybe someone will rewrite it. * ddb/db_mp.c (db_console): Definition only if CONSOLE_ON_MASTER. * ddb/db_mp.h [CONSOLE_ON_MASTER] (db_console): Add prototype.
* ddb/db_mp.c: use boolean instead of an intMarin Ramesa2013-12-091-1/+1
| | | | * ddb/db_mp.c (db_enter_debug): Use boolean instead of an int.
* ddb/db_examine.c: trivial stylistic fix for consistencyMarin Ramesa2013-12-091-3/+3
| | | | * ddb/db_examine.c: Trivial stylistic fix for consistency.
* ddb/db_examine.c (db_examine_cmd): remove forward declarationMarin Ramesa2013-12-091-1/+0
| | | | * ddb/db_examine.c (db_option): Remove forward declaration.
* ddb/db_command.c (db_command): remove forward declarationMarin Ramesa2013-12-091-1/+0
| | | | * ddb/db_command.c (db_fncall): Remove forward declaration.
* ddb/db_command.c: use boolean valuesMarin Ramesa2013-12-091-4/+4
| | | | * ddb/db_command.c (db_cmd_loop_done): Use boolean values.
* ddb/db_break.c (db_find_thread_breakpoint_here): remove unnecessary castMarin Ramesa2013-12-091-1/+1
| | | | | | Variable addr is already of type db_addr_t. * ddb/db_break.c (db_find_thread_breakpoint_here) (addr): Don't cast to db_addr_t.
* ddb/db_break.c (db_add_thread_breakpoint): fix argument listMarin Ramesa2013-12-091-0/+1
| | | | * ddb/db_break.c (db_add_thread_breakpoint): Fix argument list.
* ddb/db_aout.c (aout_db_lookup): remove forward declarationMarin Ramesa2013-12-092-2/+6
| | | | | * ddb/db_aout.c (db_sym_parse_and_lookup): Remove forward declaration. * ddb/db_sym.h (db_sym_parse_and_lookup): Add prototype.
* ddb/db_aout.c (aout_db_qualified_search): use DB_SYM_NULL as return valueMarin Ramesa2013-12-091-5/+5
| | | | | | | Function aout_db_qualified_search() returns db_sym_t. Use DB_SYM_NULL as return value instead of zero. * ddb/db_aout.c (aout_db_qualified_search): Use DB_SYM_NULL as return value.
* ddb/db_output.c: remove forward declarationMarin Ramesa2013-12-092-2/+3
| | | | | | * ddb/db_input.h (db_check_interrupt): Add prototype. * ddb/db_output.c: Include ddb/db_input.h. (db_check_interrupt): Remove forward declaration.
* ddb/db_output.c: remove duplicate functionMarin Ramesa2013-12-082-13/+2
| | | | | | | | | Function kdbprintf() and db_printf() are the same function. Remove kdbprintf() and define kdbprintf to db_printf. * ddb/db_output.c (kdbprintf): Remove function. * ddb/db_output.h: Define kdbprintf to db_printf. (kdbprintf): Remove prototype.
* ddb/db_output.c: remove call to nonexistent db_printf_enter()Marin Ramesa2013-12-081-3/+0
| | | | * ddb/db_output.c [db_printf_enter] (db_printf_enter): Remove call to nonexistent function.
* ddb/db_command.h: remove duplicate variable declarationMarin Ramesa2013-12-081-2/+0
| | | | * ddb/db_command.h (db_recover): Remove duplicate variable declaration.
* ddb/db_command.c: remove forward declarationMarin Ramesa2013-12-081-2/+0
| | | | * ddb/db_command.c (db_skip_to_eol): Remove forward declaration.
* Add missing includeSamuel Thibault2013-12-051-0/+1
| | | | * ddb/db_variables.h: Include <machine/db_machdep.h>.
* ddb/db_variables.c: fix near initializationMarin Ramesa2013-12-052-2/+4
| | | | | * ddb/db_task_thread.c (db_set_default_thread): New parameter. * ddb/db_task_thread.h (db_set_default_thread): Likewise.
* ddb/db_variables.c: remove forward declarationsMarin Ramesa2013-12-052-3/+16
| | | | | | | * ddb/db_task_thread.h: Include ddb/db_variables.h. (db_set_default_thread, db_get_task_thread): Add prototypes. * ddb/db_variables: Include ddb/db_macro.h. (db_set_default_thread, db_get_task_thread, db_arg_variable): Remove forward declarations.
* ddb/db_trap.c: remove forward declarationsMarin Ramesa2013-12-052-3/+11
| | | | | | * ddb/db_run.h (db_restart_at_pc, db_stop_at_pc): Add prototypes. * ddb/db_trap.c (db_restart_at_pc, db_stop_at_pc): Remove forward declarations. Include ddb/db_run.h.
* ddb/db_command.c: remove useless forward declaration without definitionMarin Ramesa2013-12-051-5/+0
| | | | | * ddb/db_command.c (ddb_display): Remove forward declaration. Remove ddb_display call.
* ddb/db_command.c: remove forward declarationMarin Ramesa2013-12-051-2/+0
| | | | | | * ddb/db_command.c (db_reset_cpu): Remove forward declaration. * i386/i386/db_interface.h (db_reset_cpu): Add prototype. * i386/i386at/model_dep.c: Include i386/db_interface.h.
* ddb/db_sym.c: fix argument listMarin Ramesa2013-12-051-1/+1
| | | | * ddb/db_sym.c (dummy_db_free_symbol): Fix argument list.
* ddb/db_sym.c: remove useless forward declarations without definitionsMarin Ramesa2013-12-051-9/+0
| | | | | * ddb/db_sym.c (coff_db_sym_init, coff_db_line_at_pc, db_sym_t coff_db_lookup, coff_db_search_symbol, coff_db_symbol_values): Remove forward declarations. (x_db): Modify field definition.
* ddb: new header file db_aout.hMarin Ramesa2013-12-054-7/+61
| | | | | | | | | | | | | | * Makefrag.am: Include ddb/db_aout.h. * ddb/db_aout.c: Include ddb/db_aout.h. * ddb/db_aout.h: New file. Add copyright. [_DDB_DB_AOUT_H_]: Add ifndef. Include ddb/db_sym.h. Include machine/db_machdep.h. (aout_db_line_at_pc, aout_db_lookup, aout_db_search_symbol, aout_db_symbol_values): Add prototypes. * ddb/db_sym.c: Include ddb/db_aout.h. (db_search_in_task_symbol, aout_db_line_at_pc, aout_db_lookup, aout_db_search_symbol, aout_db_symbol_values): Remove forward declarations. * ddb/db_sym.h (db_search_in_task_symbol): Add prototype.
* ddb/db_aout.c: trivial stylistic fix for consistencyMarin Ramesa2013-12-051-1/+1
| | | | * ddb/db_aout.c: Trivial stylistic fix for consistency.
* ddb/db_run.c: add comment after endifMarin Ramesa2013-12-051-1/+1
| | | | * ddb/db_run.c [FIXUP_PC_AFTER_BREAK]: Add comment after endif.
* ddb/db_mp.c: add comment after else and endifMarin Ramesa2013-12-051-3/+3
| | | | * ddb/db_mp.c [CONSOLE_ON_MASTER]: Add comment after else and endif.
* ddb/db_input.c: add comment after endifMarin Ramesa2013-12-051-3/+3
| | | | * ddb/db_input.c [DB_HISTORY_SIZE]: Add comment after endif.
* ddb/db_command.c: remove forward declarationsMarin Ramesa2013-12-052-2/+3
| | | | | | | * ddb/db_command.c: Include machine/db_interface.h. (db_help_cmd, db_stack_trace_cmd): Remove forward declarations. * ddb/db_command.h (db_help_cmd): Add prototype. * i386/i386/db_interface.h (db_stack_trace_cmd): Add prototype.
* Modify struct db_variableMarin Ramesa2013-11-245-15/+15
| | | | | | | | | | | | * ddb/db_macro.c (db_arg_variable): Make function void. * ddb/db_macro.h (db_arg_variable): Declare void return. * ddb/db_task_thread.c (db_set_default_thread): Make function void. (db_get_task_thread): Make function void. * ddb/db_variables.c (db_set_default_thread, db_get_task_thread, db_arg_variable): Declare void return. (db_read_write_variable): Use void in initialization. * ddb/db_variables.h (db_variable): Make third member return void. [FCN_NULL]: Define void. * i386/i386/db_trace.c (db_i386_reg_value): Make function void.
* ddb/db_examine.c: trivial stylistic fix for consistencyMarin Ramesa2013-11-241-1/+1
| | | | * ddb/db_examine.c: Trivial stylistic fix for consistency.
* ddb: move forward declarations into a header fileMarin Ramesa2013-11-242-6/+16
| | | | | * ddb/db_examine.c (db_disasm, db_search): Remove forward declarations. * ddb/db_examine.h (db_disasm, db_search): Add prototypes.
* ddb: move forward declaration into a header fileMarin Ramesa2013-11-242-2/+2
| | | | | * ddb/db_sym.c (db_lookup): Remove forward declaration. * ddb/db_sym.h (db_lookup): Add prototype.