OLD | NEW |
1 /* Ada Ravenscar thread support. | 1 /* Ada Ravenscar thread support. |
2 | 2 |
3 Copyright 2004, 2009-2012 Free Software Foundation, Inc. | 3 Copyright 2004, 2009-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static ptid_t ravenscar_running_thread (void); | 65 static ptid_t ravenscar_running_thread (void); |
66 static char *ravenscar_extra_thread_info (struct thread_info *tp); | 66 static char *ravenscar_extra_thread_info (struct thread_info *tp); |
67 static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid); | 67 static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid); |
68 static void ravenscar_fetch_registers (struct target_ops *ops, | 68 static void ravenscar_fetch_registers (struct target_ops *ops, |
69 struct regcache *regcache, int regnum); | 69 struct regcache *regcache, int regnum); |
70 static void ravenscar_store_registers (struct target_ops *ops, | 70 static void ravenscar_store_registers (struct target_ops *ops, |
71 struct regcache *regcache, int regnum); | 71 struct regcache *regcache, int regnum); |
72 static void ravenscar_prepare_to_store (struct regcache *regcache); | 72 static void ravenscar_prepare_to_store (struct regcache *regcache); |
73 static void ravenscar_initialize (char *name, int from_tty); | 73 static void ravenscar_initialize (char *name, int from_tty); |
74 static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step, | 74 static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step, |
75 » » » enum target_signal siggnal); | 75 » » » enum gdb_signal siggnal); |
76 static void ravenscar_mourn_inferior (struct target_ops *ops); | 76 static void ravenscar_mourn_inferior (struct target_ops *ops); |
77 static void ravenscar_update_inferior_ptid (void); | 77 static void ravenscar_update_inferior_ptid (void); |
78 static int has_ravenscar_runtime (void); | 78 static int has_ravenscar_runtime (void); |
79 static int ravenscar_runtime_initialized (void); | 79 static int ravenscar_runtime_initialized (void); |
80 static void ravenscar_inferior_created (struct target_ops *target, | 80 static void ravenscar_inferior_created (struct target_ops *target, |
81 int from_tty); | 81 int from_tty); |
82 | 82 |
83 /* Fetch the ravenscar running thread from target memory and | 83 /* Fetch the ravenscar running thread from target memory and |
84 update inferior_ptid accordingly. */ | 84 update inferior_ptid accordingly. */ |
85 | 85 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 static void | 182 static void |
183 ravenscar_close (int quitting) | 183 ravenscar_close (int quitting) |
184 { | 184 { |
185 ravenscar_is_open = 0; | 185 ravenscar_is_open = 0; |
186 } | 186 } |
187 | 187 |
188 static void | 188 static void |
189 ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step, | 189 ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step, |
190 » » enum target_signal siggnal) | 190 » » enum gdb_signal siggnal) |
191 { | 191 { |
192 struct target_ops *beneath = find_target_beneath (ops); | 192 struct target_ops *beneath = find_target_beneath (ops); |
193 | 193 |
194 inferior_ptid = base_ptid; | 194 inferior_ptid = base_ptid; |
195 beneath->to_resume (beneath, base_ptid, step, siggnal); | 195 beneath->to_resume (beneath, base_ptid, step, siggnal); |
196 } | 196 } |
197 | 197 |
198 static ptid_t | 198 static ptid_t |
199 ravenscar_wait (struct target_ops *ops, ptid_t ptid, | 199 ravenscar_wait (struct target_ops *ops, ptid_t ptid, |
200 struct target_waitstatus *status, | 200 struct target_waitstatus *status, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 const char *value) | 414 const char *value) |
415 { | 415 { |
416 if (ravenscar_task_support) | 416 if (ravenscar_task_support) |
417 fprintf_filtered (file, _("\ | 417 fprintf_filtered (file, _("\ |
418 Support for Ravenscar task/thread switching is enabled\n")); | 418 Support for Ravenscar task/thread switching is enabled\n")); |
419 else | 419 else |
420 fprintf_filtered (file, _("\ | 420 fprintf_filtered (file, _("\ |
421 Support for Ravenscar task/thread switching is disabled\n")); | 421 Support for Ravenscar task/thread switching is disabled\n")); |
422 } | 422 } |
423 | 423 |
| 424 /* Provide a prototype to silence -Wmissing-prototypes. */ |
| 425 extern void _initialize_ravenscar (void); |
| 426 |
424 /* Module startup initialization function, automagically called by | 427 /* Module startup initialization function, automagically called by |
425 init.c. */ | 428 init.c. */ |
426 | 429 |
427 void | 430 void |
428 _initialize_ravenscar (void) | 431 _initialize_ravenscar (void) |
429 { | 432 { |
430 init_ravenscar_thread_ops (); | 433 init_ravenscar_thread_ops (); |
431 base_ptid = null_ptid; | 434 base_ptid = null_ptid; |
432 | 435 |
433 /* Notice when the inferior is created in order to push the | 436 /* Notice when the inferior is created in order to push the |
(...skipping 13 matching lines...) Expand all Loading... |
447 add_setshow_boolean_cmd ("task-switching", class_obscure, | 450 add_setshow_boolean_cmd ("task-switching", class_obscure, |
448 &ravenscar_task_support, _("\ | 451 &ravenscar_task_support, _("\ |
449 Enable or disable support for GNAT Ravenscar tasks"), _("\ | 452 Enable or disable support for GNAT Ravenscar tasks"), _("\ |
450 Show whether support for GNAT Ravenscar tasks is enabled"), | 453 Show whether support for GNAT Ravenscar tasks is enabled"), |
451 _("\ | 454 _("\ |
452 Enable or disable support for task/thread switching with the GNAT\n\ | 455 Enable or disable support for task/thread switching with the GNAT\n\ |
453 Ravenscar run-time library for bareboard configuration."), | 456 Ravenscar run-time library for bareboard configuration."), |
454 NULL, show_ravenscar_task_switching_command, | 457 NULL, show_ravenscar_task_switching_command, |
455 &set_ravenscar_list, &show_ravenscar_list); | 458 &set_ravenscar_list, &show_ravenscar_list); |
456 } | 459 } |
OLD | NEW |