OLD | NEW |
1 /* Darwin support for GDB, the GNU debugger. | 1 /* Darwin support for GDB, the GNU debugger. |
2 Copyright 1997-2002, 2008-2012 Free Software Foundation, Inc. | 2 Copyright 1997-2002, 2008-2012 Free Software Foundation, Inc. |
3 | 3 |
4 Contributed by Apple Computer, Inc. | 4 Contributed by Apple Computer, Inc. |
5 | 5 |
6 This file is part of GDB. | 6 This file is part of GDB. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 printf_unfiltered (_("\n")); | 294 printf_unfiltered (_("\n")); |
295 } | 295 } |
296 | 296 |
297 vm_deallocate (task_self (), (vm_address_t) names, | 297 vm_deallocate (task_self (), (vm_address_t) names, |
298 (name_count * sizeof (mach_port_t))); | 298 (name_count * sizeof (mach_port_t))); |
299 vm_deallocate (task_self (), (vm_address_t) types, | 299 vm_deallocate (task_self (), (vm_address_t) types, |
300 (type_count * sizeof (mach_port_type_t))); | 300 (type_count * sizeof (mach_port_type_t))); |
301 } | 301 } |
302 | 302 |
303 | 303 |
304 void | 304 static void |
305 darwin_debug_port_info (task_t task, mach_port_t port) | 305 darwin_debug_port_info (task_t task, mach_port_t port) |
306 { | 306 { |
307 kern_return_t kret; | 307 kern_return_t kret; |
308 mach_port_status_t status; | 308 mach_port_status_t status; |
309 mach_msg_type_number_t len = sizeof (status); | 309 mach_msg_type_number_t len = sizeof (status); |
310 | 310 |
311 kret = mach_port_get_attributes | 311 kret = mach_port_get_attributes |
312 (task, port, MACH_PORT_RECEIVE_STATUS, (mach_port_info_t)&status, &len); | 312 (task, port, MACH_PORT_RECEIVE_STATUS, (mach_port_info_t)&status, &len); |
313 MACH_CHECK_ERROR (kret); | 313 MACH_CHECK_ERROR (kret); |
314 | 314 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 inf = current_inferior (); | 836 inf = current_inferior (); |
837 | 837 |
838 kret = task_get_exception_ports | 838 kret = task_get_exception_ports |
839 (inf->private->task, EXC_MASK_ALL, info.masks, | 839 (inf->private->task, EXC_MASK_ALL, info.masks, |
840 &info.count, info.ports, info.behaviors, info.flavors); | 840 &info.count, info.ports, info.behaviors, info.flavors); |
841 MACH_CHECK_ERROR (kret); | 841 MACH_CHECK_ERROR (kret); |
842 disp_exception (&info); | 842 disp_exception (&info); |
843 } | 843 } |
844 } | 844 } |
845 | 845 |
| 846 /* -Wmissing-prototypes */ |
| 847 extern initialize_file_ftype _initialize_darwin_info_commands; |
| 848 |
846 void | 849 void |
847 _initialize_darwin_info_commands (void) | 850 _initialize_darwin_info_commands (void) |
848 { | 851 { |
849 add_info ("mach-tasks", info_mach_tasks_command, | 852 add_info ("mach-tasks", info_mach_tasks_command, |
850 _("Get list of tasks in system.")); | 853 _("Get list of tasks in system.")); |
851 add_info ("mach-ports", info_mach_ports_command, | 854 add_info ("mach-ports", info_mach_ports_command, |
852 _("Get list of ports in a task.")); | 855 _("Get list of ports in a task.")); |
853 add_info ("mach-port", info_mach_port_command, | 856 add_info ("mach-port", info_mach_port_command, |
854 _("Get info on a specific port.")); | 857 _("Get info on a specific port.")); |
855 add_info ("mach-task", info_mach_task_command, | 858 add_info ("mach-task", info_mach_task_command, |
856 _("Get info on a specific task.")); | 859 _("Get info on a specific task.")); |
857 add_info ("mach-threads", info_mach_threads_command, | 860 add_info ("mach-threads", info_mach_threads_command, |
858 _("Get list of threads in a task.")); | 861 _("Get list of threads in a task.")); |
859 add_info ("mach-thread", info_mach_thread_command, | 862 add_info ("mach-thread", info_mach_thread_command, |
860 _("Get info on a specific thread.")); | 863 _("Get info on a specific thread.")); |
861 | 864 |
862 add_info ("mach-regions", info_mach_regions_command, | 865 add_info ("mach-regions", info_mach_regions_command, |
863 _("Get information on all mach region for the task.")); | 866 _("Get information on all mach region for the task.")); |
864 add_info ("mach-regions-rec", info_mach_regions_recurse_command, | 867 add_info ("mach-regions-rec", info_mach_regions_recurse_command, |
865 _("Get information on all mach sub region for the task.")); | 868 _("Get information on all mach sub region for the task.")); |
866 add_info ("mach-region", info_mach_region_command, | 869 add_info ("mach-region", info_mach_region_command, |
867 _("Get information on mach region at given address.")); | 870 _("Get information on mach region at given address.")); |
868 | 871 |
869 add_info ("mach-exceptions", info_mach_exceptions_command, | 872 add_info ("mach-exceptions", info_mach_exceptions_command, |
870 _("Disp mach exceptions.")); | 873 _("Disp mach exceptions.")); |
871 } | 874 } |
OLD | NEW |