<feed xmlns='http://www.w3.org/2005/Atom'>
<title>teythoon/gnumach.git/ddb, branch master</title>
<subtitle>Personal GNU Mach development repository</subtitle>
<id>https://darnassus.sceen.net/cgit/teythoon/gnumach.git/atom?h=master</id>
<link rel='self' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/'/>
<updated>2015-06-28T11:04:20Z</updated>
<entry>
<title>ddb: automatically display stack traces</title>
<updated>2015-06-28T11:04:20Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2015-06-26T12:44:32Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=3007bbdba1283f03fb64c15fe8145090382c1f95'/>
<id>urn:sha1:3007bbdba1283f03fb64c15fe8145090382c1f95</id>
<content type='text'>
* ddb/db_trap.c (db_task_trap): Automatically display stack traces if
an unexpected trap occurs.
</content>
</entry>
<entry>
<title>ipc: replace the IPC table with a radix tree</title>
<updated>2015-05-20T09:08:29Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2015-03-19T23:21:14Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=77b3b60aaee2382142dc7ed50e5b36664cdb21bc'/>
<id>urn:sha1:77b3b60aaee2382142dc7ed50e5b36664cdb21bc</id>
<content type='text'>
Currently, the port names are mapped to an IPC object (e.g. a port)
using a table.  This, however, requires large chunks of continuous
memory, and leads to scalability problems as virtual kernel memory is
a scarce resource.  To avoid excessive overhead, non-contiguous port
names are spilled into a splay tree.

Replace the IPC table with a radix tree.  As the radix tree is able to
store non-contiguous names with reasonable overhead, we can drop the
splay tree as well.

* ipc/ipc_entry.c (ipc_entry_tree_collision): Remove function.
(ipc_entry_cache): New variable.
(ipc_entry_lookup): Replace with a radix tree lookup.
(ipc_entry_get): The free list handling is changed a little.  Adopt
accordingly.
(ipc_entry_free_name): New function.
(ipc_entry_alloc): Adopt accordingly.
(ipc_entry_alloc_name): Likewise.
(ipc_entry_dealloc): Likewise.
(ipc_entry_grow_table): Remove function.
* ipc/ipc_entry.h (struct ipc_entry): Update comment, add field for
name and free list, remove unused fields.
(ipc_entry_cache, ie_alloc, ie_free): New declarations.
(struct ipc_tree_entry): Remove.  Also remove any related declarations.
(ipc_entry_grow_table): Remove declaration.
* ipc/ipc_init.c (ipc_bootstrap): Adopt initialization.
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): Use `ipc_entry_alloc'
instead of re-coding it.  Adopt free list handling.
(ipc_kmsg_copyout_object): Adopt free list handling, store the name.
* ipc/ipc_object.c (ipc_object_copyout): Likewise.
(ipc_object_copyout_multiname): Likewise.
* ipc/ipc_space.c (ipc_space_create): Initialize radix tree and free list.
Drop table and splay tree initialization.
(ipc_space_destroy): Free ipc entries and radix tree, remove table and
splay tree cleanup.
* ipc/ipc_space.h (struct ipc_space): Add radix tree, free list, and size.
Remove all fields related to the table and splay tree.
* ddb/db_print.c (db_port_iterate): Adopt iteration.
(db_lookup_port): Adopt lookup.
* include/mach_debug/ipc_info.h: Remove unused parts of the debug interface.
* include/mach_debug/mach_debug.defs: Likewise.
* include/mach_debug/mach_debug_types.defs: Likewise.
* ipc/mach_debug.c: Likewise.
* ipc/ipc_right.c (ipc_right_reverse): Adopt lookup, store name.
(ipc_right_check): Adopt removal.
(ipc_right_destroy): Likewise.
(ipc_right_dealloc): Likewise.
(ipc_right_delta): Likewise.
(ipc_right_copyin): Adopt insertion, adopt removal.
(ipc_right_copyin_two): Adopt removal.
(ipc_right_copyout): Adopt insertion, adopt removal.
(ipc_right_rename): Likewise, also update comment.
* ipc/mach_port.c (mach_port_names): Adopt iteration.
(mach_port_get_set_status): Likewise.
* ipc/port.h: Update comment.
* ipc/ipc_hash.c: Delete file.
* ipc/ipc_hash.h: Likewise.
* ipc/ipc_splay.c: Likewise.
* ipc/ipc_splay.h: Likewise.
* Makefrag.am (libkernel_a_SOURCES): Remove these files.
</content>
</entry>
<entry>
<title>ddb: Fix typos in comments (found by codespell)</title>
<updated>2015-01-02T19:07:26Z</updated>
<author>
<name>Stefan Weil</name>
<email>sw@weilnetz.de</email>
</author>
<published>2015-01-02T15:02:47Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=24a89f673857e8f49c3890f5a527f34d1b16806d'/>
<id>urn:sha1:24a89f673857e8f49c3890f5a527f34d1b16806d</id>
<content type='text'>
Signed-off-by: Stefan Weil &lt;sw@weilnetz.de&gt;
</content>
</entry>
<entry>
<title>ddb: add support for ELF symbol tables</title>
<updated>2014-09-17T09:39:55Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-09-14T11:35:50Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=86f60379f71ec6d0aa3b93eaacc55bc5f453bda5'/>
<id>urn:sha1:86f60379f71ec6d0aa3b93eaacc55bc5f453bda5</id>
<content type='text'>
* ddb/db_elf.c: New file.
* ddb/db_elf.h: Likewise.
* Makefrag.am (libkernel_a_SOURCES): Add db_elf.{c,h}.
* ddb/db_sym.c (dummy_db_sym_init): New stub db_sym_init function.
(db_sym_switch): Add ELF functions.
* ddb/db_sym.h (SYMTAB_ELF): New macro.
(elf_db_sym_init): New declaration.
* i386/i386at/model_dep.c (c_boot_entry): Get ELF section header
information from the multiboot structure, and call elf_db_sym_init.
</content>
</entry>
<entry>
<title>ddb: add `show all tasks' command</title>
<updated>2014-09-17T09:39:55Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-09-12T22:41:11Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=ffd4f3c8239b41d3fe9fa14403eb063e02b6a222'/>
<id>urn:sha1:ffd4f3c8239b41d3fe9fa14403eb063e02b6a222</id>
<content type='text'>
* ddb/db_command.c (db_show_all_cmds): Add `tasks'.
* ddb/db_print.c (db_show_all_tasks): New function.
* ddb/db_print.h (db_show_all_tasks): New prototype.
</content>
</entry>
<entry>
<title>ddb: use db_thread_stat to format the flags</title>
<updated>2014-06-11T08:34:25Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-06-09T13:25:57Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=5fdfd14beb86088faa058bcd6c2b27bb41a1a510'/>
<id>urn:sha1:5fdfd14beb86088faa058bcd6c2b27bb41a1a510</id>
<content type='text'>
* ddb/db_print.c (db_print_thread): Use db_thread_stat to format the
flags.
</content>
</entry>
<entry>
<title>ddb: print task names if available</title>
<updated>2014-06-11T08:33:54Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-06-09T13:15:58Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=1d1a672bcac7b36ff35e48fb9633d56c8e733343'/>
<id>urn:sha1:1d1a672bcac7b36ff35e48fb9633d56c8e733343</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>ddb: add "halt" command</title>
<updated>2014-05-03T00:01:18Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-05-02T16:51:50Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=12baa940dd214046902a0d7815f24cfad989fe79'/>
<id>urn:sha1:12baa940dd214046902a0d7815f24cfad989fe79</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>Convert from K&amp;R to ANSI</title>
<updated>2014-04-04T20:32:52Z</updated>
<author>
<name>Marin Ramesa</name>
<email>mpr@hi.t-com.hr</email>
</author>
<published>2014-04-04T20:32:14Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=fe0231ba14d8597b0d78bf6121dd15a82bbab34a'/>
<id>urn:sha1:fe0231ba14d8597b0d78bf6121dd15a82bbab34a</id>
<content type='text'>
Convert from K&amp;R style function definitions to ANSI style
function definitions.

* ddb/db_access.c: Convert function prototypes from K&amp;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.
</content>
</entry>
<entry>
<title>ddb: safely copy symbol names into the symtab structure</title>
<updated>2014-02-04T14:21:06Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-02-04T10:43:41Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/gnumach.git/commit/?id=172f3ea324a3685a62b03edd8b03e5f09e265301'/>
<id>urn:sha1:172f3ea324a3685a62b03edd8b03e5f09e265301</id>
<content type='text'>
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.
</content>
</entry>
</feed>
