summaryrefslogtreecommitdiff
path: root/gdb/ada-tasks.c
Commit message (Collapse)AuthorAgeFilesLines
* PR gdb/15911: "info threads" changes the default source and line (for ↵Pedro Alves2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "break", "list") "info threads" changes the default source for "break" and "list", to whatever the location of the first/bottom thread in the thread list is... (gdb) b start (gdb) c ... (gdb) list *lists "start"* (gdb) b 23 Breakpoint 3 at 0x400614: file test.c, line 23. (gdb) info threads Id Target Id Frame * 2 Thread 0x7ffff7fcb700 (LWP 1760) "test" start (arg=0x0) at test.c:23 1 Thread 0x7ffff7fcc740 (LWP 1748) "test" 0x000000323dc08e60 in pthread_join (threadid=140737353922304, thread_return=0x0) at pthread_join.c:93 (gdb) b 23 Breakpoint 4 at 0x323dc08d90: file pthread_join.c, line 23. ^^^^^^^^^^^^^^^ (gdb) list 93 lll_wait_tid (pd->tid); 94 95 96 /* Restore cancellation mode. */ 97 CANCEL_RESET (oldtype); 98 99 /* Remove the handler. */ 100 pthread_cleanup_pop (0); 101 102 The issue is that print_stack_frame always sets the current sal to the frame's sal. print_frame_info (which print_stack_frame calls to do most of the work) also sets the last displayed sal, but only if print_what isn't LOCATION. Now the call in question, from within thread.c:print_thread_info, does pass in LOCATION as print_what, but print_stack_frame doesn't have the same check print_frame_info has. We could consider adding it, but setting these globals depending on print_what isn't very clean, IMO. What we have is two logically distinct operations mixed in the same function(s): #1 - print frame, in the format specified by {print_what, print_level and print_args}. #2 - We're displaying a frame to the user, and I want the default sal to point here, because the program stopped here, or the user did some context-changing command (up, down, etc.). So I added a new parameter to print_stack_frame & friends for point #2, and went through all calls in the tree adjusting as necessary. Tested on x86_64 Fedora 17. gdb/ 2013-09-17 Pedro Alves <palves@redhat.com> PR gdb/15911 * ada-tasks.c (task_command_1): Adjust call to print_stack_frame. * bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): * corelow.c (core_open): * frame.h (print_stack_frame, print_frame_info): New 'set_current_sal' parameter. * infcmd.c (finish_command, kill_command): Adjust call to print_stack_frame. * inferior.c (inferior_command): Likewise. * infrun.c (normal_stop): Likewise. * linux-fork.c (linux_fork_context): Likewise. * record-full.c (record_full_goto_entry, record_full_restore): Likewise. * remote-mips.c (common_open): Likewise. * stack.c (print_stack_frame): New 'set_current_sal' parameter. Use it. (print_frame_info): New 'set_current_sal' parameter. Set the last displayed sal depending on the new paremeter instead of looking at print_what. (backtrace_command_1, select_and_print_frame, frame_command) (current_frame_command, up_command, down_command): Adjust call to print_stack_frame. * thread.c (print_thread_info, restore_selected_frame) (do_captured_thread_select): Adjust call to print_stack_frame. * tracepoint.c (tfind_1): Likewise. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames) (mi_cmd_stack_info_frame): Likewise. * mi/mi-interp.c (mi_on_normal_stop): Likewise. * mi/mi-main.c (mi_cmd_exec_return, mi_cmd_trace_find): Likewise. gdb/testsuite/ * gdb.threads/info-threads-cur-sal-2.c: New file. * gdb.threads/info-threads-cur-sal.c: New file. * gdb.threads/info-threads-cur-sal.exp: New file.
* ada-tasks.c: write SRC_AND_LOC instead '1'.Pedro Alves2013-08-301-1/+2
| | | | | | | | 1 is SRC_AND_LOC. 2013-08-30 Pedro Alves <palves@redhat.com> * ada-tasks.c (task_command_1): Write SRC_AND_LOC instead '1'.
* -Wpointer-sign: ada-lang.c, ada-tasks.c.Pedro Alves2013-04-191-1/+1
| | | | | | | | | | | We're reading strings using the target memory access routines, which work with raw bytes, so we need a couple casts. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * ada-lang.c (print_it_exception): Add cast to gdb_byte *. * ada-tasks.c (read_fat_string_value): Likewise.
* * minsyms.h (struct bound_minimal_symbol): New.Tom Tromey2013-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove objfile argument. (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. * minsyms.c (lookup_minimal_symbol_by_pc_1) (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. (in_gnu_ifunc_stub): Update. (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove 'objfile_p' argument. (lookup_solib_trampoline_symbol_by_pc): Update. * ada-tasks.c, amd64-windows-tdep.c, arm-tdep.c, arm-wince-tdep.c, block.c, blockframe.c, breakpoint.c, btrace.c, c-valprint.c, dwarf2loc.c, elfread.c, frame.c, frv-tdep.c, glibc-tdep.c, gnu-v2-abi.c, gnu-v3-abi.c, hppa-hpux-tdep.c, i386-tdep.c, ia64-tdep.c, infcall.c, infcmd.c, jit.c, linux-fork.c, m32c-tdep.c, m68hc11-tdep.c, maint.c, mips-tdep.c, p-valprint.c, parse.c, ppc-linux-tdep.c, ppc-sysv-tdep.c, printcmd.c, rs6000-tdep.c, sh64-tdep.c, stack.c, symtab.c, tui/tui-disasm.c: Update.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-2/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* * gdbarch.sh (target_gdbarch): Remove macro.Tom Tromey2012-11-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | (get_target_gdbarch): Rename to target_gdbarch. * gdbarch.c, gdbarch.h: Rebuild. * ada-tasks.c, aix-thread.c, amd64-linux-nat.c, arch-utils.c, arm-tdep.c, auxv.c, breakpoint.c, bsd-uthread.c, corefile.c, darwin-nat-info.c, dcache.c, dsrec.c, exec.c, fbsd-nat.c, filesystem.c, gcore.c, gnu-nat.c, i386-darwin-nat.c, i386-nat.c, ia64-vms-tdep.c, inf-ptrace.c, infcmd.c, jit.c, linux-nat.c, linux-tdep.c, linux-thread-db.c, m32r-rom.c, memattr.c, mep-tdep.c, microblaze-tdep.c, mips-linux-nat.c, mips-linux-tdep.c, mips-tdep.c, monitor.c, moxie-tdep.c, nto-procfs.c, nto-tdep.c, ppc-linux-nat.c, proc-service.c, procfs.c, progspace.c, ravenscar-thread.c, record.c, remote-m32r-sdi.c, remote-mips.c, remote-sim.c, remote.c, rl78-tdep.c, rs6000-nat.c, rx-tdep.c, s390-nat.c, sol-thread.c, solib-darwin.c, solib-dsbt.c, solib-frv.c, solib-ia64-hpux.c, solib-irix.c, solib-pa64.c, solib-som.c, solib-spu.c, solib-sunos.c, solib-svr4.c, solib.c, spu-linux-nat.c, spu-multiarch.c, spu-tdep.c, symfile-mem.c, symfile.c, symtab.c, target-descriptions.c, target.c, target.h, tracepoint.c, windows-nat.c, windows-tdep.c, xcoffsolib.c, cli/cli-dump.c, common/agent.c, mi/mi-interp.c, python/py-finishbreakpoint.c, python/py-inferior.c, python/python.c: Update.
* 2012-05-18 Sergio Durigan Junior <sergiodj@redhat.com>sergiodj2012-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: * avr-tdep.c: * ax-gdb.c: * bfin-linux-tdep.c: * breakpoint.c: * c-valprint.c: * cli/cli-cmds.c: * coffread.c: * cp-support.c: * cris-tdep.c: * dwarf2-frame-tailcall.c: * dwarf2-frame.c: * dwarf2expr.c: * dwarf2loc.c: * dwarf2read.c: * elfread.c: * eval.c: * expprint.c: * f-valprint.c: * frv-tdep.c: * h8300-tdep.c: * hppa-hpux-tdep.c: * hppa-tdep.c: * hppanbsd-tdep.c: * i386-nto-tdep.c: * i386-tdep.c: * i387-tdep.c: * ia64-tdep.c: * jit.c: * linespec.c: * linux-tdep.c: * lm32-tdep.c: * m2-valprint.c: * m32c-tdep.c: * m32r-rom.c: * m32r-tdep.c: * m68k-tdep.c: * m68klinux-tdep.c: * mi/mi-main.c: * microblaze-tdep.c: * mips-linux-tdep.c: * mips-tdep.c: * mn10300-tdep.c: * p-valprint.c: * parse.c: * ppc-linux-tdep.c: * ppc-sysv-tdep.c: * printcmd.c: * python/py-finishbreakpoint.c: * python/py-inferior.c: * python/py-infthread.c: * python/py-type.c: * python/python.c: * remote-fileio.c: * remote-m32r-sdi.c: * remote-mips.c: * reverse.c: * rl78-tdep.c: * rs6000-aix-tdep.c: * rs6000-tdep.c: * s390-tdep.c: * score-tdep.c: * sh64-tdep.c: * skip.c: * solib-darwin.c: * solib-dsbt.c: * solib-frv.c: * sparc-tdep.c: * spu-multiarch.c: * spu-tdep.c: * stack.c: * symfile.c: * symtab.c: * tic6x-tdep.c: * tracepoint.c: * v850-tdep.c: * valarith.c: * valprint.c: * value.c: * xcoffread.c: * xtensa-tdep.c: * ada-lang.c: * ada-tasks.c: * ada-varobj.c: * amd64-darwin-tdep.c: * arm-symbian-tdep.c: * arm-tdep.c: Delete unused variables.
* Fix ARI violation in ada_tasks_inferior_data_sniffer.Joel Brobecker2012-02-281-7/+9
| | | | | | | | | | This patch removes some variable assignments inside condition expressions. gdb/ChangeLog: * ada-tasks.c (ada_tasks_inferior_data_sniffer): Rework code to avoid variable assignments inside condition.
* 2012-02-23 Tristan Gingold <gingold@adacore.com>Tristan Gingold2012-02-231-47/+91
| | | | | | | | | | | | * ada-tasks.c (struct ada_tasks_inferior_data): Add known_tasks_element and known_tasks_length fields. (read_known_tasks_array): Change argument type. Use pointer type and number of elements from DATA. Adjust. (read_known_tasks_list): Likewise. (get_known_tasks_addr): Remove. (ada_set_current_inferior_known_tasks_addr): Renamed to ... (ada_tasks_inferior_data_sniffer): ... this. Use symtab for element type and array length. Merge former get_known_tasks_addr code.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-2/+2
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* [Ada] Fix number of lines in -ada-task-info outputJoel Brobecker2011-10-211-2/+18
| | | | | | | | | | | | | | | | | | | | When using the new -ada-task-info command with an argument, the output would say that there are N entries in the returned table, (where N is the total number of tasks present in the inferior). But, in fact, the table would only contain at most 1 entry. This patch fixes this by properly computing the number of tasks being displayed before giving it to the uiout. gdb/ChangeLog: * ada-tasks.c (print_ada_task_info): Fix computation of number of tasks displayed in command output. gdb/testsuite/ChangeLog: * gdb.ada/mi_task_info/task_switch.adb: New file. * gdb.ada/mi_task_info.exp: New file.
* 2011-10-05 Tristan Gingold <gingold@adacore.com>Tristan Gingold2011-10-051-2/+26
| | | | | * ada-tasks.c (read_atcb): Make ravenscar_task_name static. Extract the ravenscar task name from the symbol for the atcb.
* [Ada] Add field "thread-id" in -ada-task-info outputJoel Brobecker2011-10-031-2/+31
| | | | | | | | | | | | | | | | This patch enhances the -ada-task-info command, adding a new field called "thread-id" in the command output. This field provides the ID of the task's corresponding thread (if that information could not be determined, the field is omitted). This field is useful in the context of GDB/MI users, because it allows a quick translation from Ada task to thread, and thus easy use of all the commands that take a --thread argument. gdb/ChangeLog: * ada-tasks.c (print_ada_task_info): Add "thread-id" field in output of -ada-task-info GDB/MI command.
* [Ada] New GDB/MI command: -ada-tasks-infoJoel Brobecker2011-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch introduces a new GDB/MI command: -ada-tasks-info, which is meant to be the MI equivalent of the CLI `info tasks' command. This new command returns an array, with each row corresponding to one task. For now, the columns of the array corresponds to the columns displayed in the CLI output. gdb/ChangeLog: * ada-lang.h (struct inferior): Declare. (print_ada_task_info): Add declaration. * ada-tasks.c (print_ada_task_info): Make non-static. * mi/mi-cmds.c (mi_cmds): Add "ada-task-info". * mi/mi-cmds.h (mi_cmd_ada_task_info): Add declaration. * mi/mi-main.c: #include "ada-lang.h". (mi_cmd_list_features): Add "ada-task-info" to the list of supported features. (mi_cmd_ada_task_info): New function.
* [Ada] Re-implement `info tasks' command using ui-outJoel Brobecker2011-09-161-63/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for providing a GDB/MI equivalent of the `info tasks' command. The previous implementation was using various printf commands to generate the command output, which does not work at all if we want to use that same code to generate the result for that new GDB/MI command. This patch thus re-implements the `info tasks' command (with no arguments) in a way that makes it GDB/MI friendly. There is an additional hicup, which is the fact that the `info tasks' command displays a completely different type of output when a task ID is given. For instance: (gdb) info task 2 Ada Task: 0x644d20 Name: my_callee Thread: 0 LWP: 0x5809 Parent: 1 (main_task) Base Priority: 48 State: Blocked in accept or select with terminate The above output is better when in CLI mode, but really not what we want when in GDB/MI mode. In GDB/MI mode, we want to follow what the `-thread-info' command does when a task-id is given as an argument, which is to produce the same table, but with only one element/task in it. For compatibility as well as practical reasons, we do not want to change the output of the `info task TASKNO' command when in CLI mode. But it's easy to preserve this behavior while providing the desirable output when in GDB/MI mode. For this, the function used to generated the `info tasks' output has been enhanced to take an argument interpreted as a string. The CLI command knows to never provide that argument, while the GDB/MI command will pass one if provided by the user. gdb/ChangeLog: * ada-tasks.c (print_ada_task_info): New function, merging short_task_info and info_tasks together. Reimplement using ui-out instead of printing to stdout directly. Move the code building and checking the task list here, instead of leaving it in info_tasks_command. (info_task): Move the code building and checking the task list here, instead of leaving it in info_tasks_command. (info_tasks_command): Delete code building and checking the task list - moved elsewhere. Update calls to info_tasks and info_task. One of the minor changes the switch caused is the introduction of a space between the "current" column, and the task "ID" column, which wasn't there before. This matches what we do in the "info threads" command, so I kept that change. This required an adjustment in the testsuite, however... gdb/testsuite/ChangeLog: * gdb.ada/tasks.exp: Make the expected output for the `info tasks' tests more resilient to spacing changes.
* [Ada] Remove `from_tty' parameter from ada-tasks.c:info_taskJoel Brobecker2011-09-161-2/+2
| | | | | | | | This parameter is unused, and probably will never be useful. gdb/ChangeLog: * ada-tasks.c (info_task): Delete parameter `from_tty'.
* [Ada] Remove `from_tty' parameter from ada-tasks.c:info_tasksJoel Brobecker2011-09-161-2/+2
| | | | | | | | This parameter is unused, and probably will never be useful. gdb/ChangeLog: * ada-tasks.c (info_tasks): Delete parameter `from_tty'.
* [Ada] Adjust ada-tasks.c:ada_build_task_listJoel Brobecker2011-09-161-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, this function had a parameter called `warn_if_null' which would trigger a message to be printed on stdout if the program was found to not use Ada tasking. It used one of the printf_ functions for that, which is wrong when considering the context of GDB/MI interpreters. So, this patch changes this function to stop printing the message, and leaves that part to the callers instead. It also changes the semantics slightly to return the number of tasks found, rather than a yes/no answer. Not strictly needed, but simple enough to do, and potentially useful later. gdb/ChangeLog: * ada-lang.h (ada_build_task_list): Remove parameter `warn_if_null'. * ada-tasks.c (ada_build_task_list): Remove parameter `warn_if_null'. Adjust implementation and documentation. (valid_task_id, ada_get_environment_task) iterate_over_live_ada_tasks): Adjust call to ada_build_task_list. (info_tasks_command): Adjust implementation. (task_command): Likewise. * ravenscar-thread.c (ravenscar_find_new_threads): Fix call to ada_build_task_list.
* [Ada] Store the Ada task list in per-inferior dataJoel Brobecker2011-09-161-105/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing "the" Ada task list using a static global in ada-tasks, this patch stores that information inside per-inferior data. We also add in the per-inferior data the location and type of data used in the runtime to store that task list. Previously, this information was saved as a static variable in one of the functions, but this approach has the major flaw that it does not handle multi-inferior debugging. gdb/ChangeLog: * ada-tasks.c (ada_tasks_check_symbol_table, task_list): Delete. (enum ada_known_tasks_kind, struct ada_tasks_inferior_data): New. (ada_tasks_inferior_data_handle): New static global. (get_ada_tasks_inferior_data): New function. (ada_get_task_number, get_task_number_from_id, valid_task_id) (ada_get_environment_task, iterate_over_live_ada_tasks) (add_ada_task, read_known_tasks_array, read_known_tasks_list): Adjust. (ada_set_current_inferior_known_tasks_addr): New function. (read_known_tasks, ada_build_task_list, short_task_info) (info_tasks, info_task, info_tasks_command, task_command_1) (task_command, ada_task_list_changed): Adjust. (ada_tasks_invalidate_inferior_data): New function. (ada_normal_stop_observer, ada_new_objfile_observer): Adjust. (_initialize_tasks): Set ada_tasks_inferior_data_handle. * ada-lang.h (struct inferior): Add declaration. (ada_task_list_changed): Update profile. * remote-wtx-pd.c: #include "inferior.h". (switch_to_pd_internal): Update call to ada_task_list_changed.
* [Ada] Make the ATCB type info program-space-specificJoel Brobecker2011-09-161-53/+136
| | | | | | | | | | | | | | | | | | | | | | This module caches the type description of various elements of the Ada Task Control Block (ATCB). This cache was implemented as static globals, which is wrong in the case where we have multiple inferiors. This change cleans things up a bit by moving some of these static globals to a per-program-space area. gdb/ChangeLog: * ada-tasks.c: #include "progspace.h" and "objfiles.h". (atcb_type, atcb_common_type, atcb_ll_type, atcb_call_type) (atcb_fieldno): Delete these static globals. (struct ada_tasks_pspace_data): New struct. (ada_tasks_pspace_data_handle): New static global. (get_ada_tasks_pspace_data): New function. (ada_tasks_invalidate_pspace_data): New function. (get_tcb_types_info, ptid_from_atcb_common, read_atcb) (read_known_tasks_list, ada_new_objfile_observer): Adjust. (_initialize_tasks): Create this module's per-progspace data handle.
* [Ada] Rename struct tcb_fieldnos into atcb_fieldnos.Joel Brobecker2011-09-161-4/+4
| | | | | | | | | | `atcb' is clearer than `tcb', as it stands for Ada Task Control Block. This is also consistent with the rest of the code, which uses atcb... gdb/ChangeLog: * ada-tasks.c (struct atcb_fieldnos): Renames struct tcb_fieldnos.
* ada-tasks.c: handle known tasks maintained by a simply-linked list.Joel Brobecker2011-07-041-64/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapping between Ada tasks, and the underlying threads is normally maintained by the GNAT runtime under the known_tasks array. For performance reasons, this array is just a static array with 10_000 entries in it. However, this is not very practical in certain environments where memory is limited. For those environments, the runtime has been enhanced to use an alternate scheme with a linked list. This change enhances the Ada tasking support to recognize this situation and use the correct way of reading the tasks info based on the the situation. gdb/ChangeLog (Tristan Gingold) * ada-tasks.c (KNOWN_TASKS_LIST): New macro. (tcb_fieldno): Add activation_link field. (get_known_tasks_addr): Moved and rewritten. (get_tcb_types_info): Set activation_link field. (read_known_tasks_array): Add parameter. Rewritten. (read_known_tasks_list): New function. (read_known_tasks): New function. (ada_build_task_list): Call read_known_tasks instead of read_known_tasks_array. * ravenscar-thread.c: Add first_task_name constant. (has_ravenscar_runtime): Check for task list too.
* Minor changes in ada-tasks.cJoel Brobecker2011-07-041-34/+31
| | | | | | | | | | | | | | Just some minor cleanup changes in preparation for an upcoming change... gdb/ChangeLog (Tristan Gingold) * ada-tasks.c: Renames fieldno to actb_fieldno. (ada_get_task_number): Indentation. (get_tcb_types_info): Remove all parameters. Write directly the globals. (ptid_from_atcb_common): Adjust. (read_atcb): Adjust.
* delete target_ops.to_lookup_symbolJoel Brobecker2011-03-171-8/+4
| | | | | | | | | | | | | | gdb/ChangeLog: * target.h (struct target_ops): Remove to_lookup_symbol field. (target_lookup_symbol): Delete macro. * target.c (nosymbol, debug_to_lookup_symbol): Delete. (update_current_target, setup_target_debug): Remove handling of to_lookup_symbol target_ops field. * ada-tasks.c (get_known_tasks_addr): Remove use of target_lookup_symbol. * coffread.c (coff_symtab_read): Likewise. * dbxread.c (read_dbx_symtab): Ditto.
* 2011-01-07 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-071-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: Comment cleanup, mostly periods and spaces. * ada-lang.h: Ditto. * ada-tasks.c: Ditto. * ada-valprint.c: Ditto. * aix-threads.c: Ditto. * alpha-linux-nat.c: Ditto. * alpha-linux-tdep.c: Ditto. * alpha-mdebug-tdep.c: Ditto. * alpha-nat.c: Ditto. * alpha-osf1-tdep.c: Ditto. * alpha-tdep.c: Ditto. * alphabsd-nat.c: Ditto. * alphabsd-tdep.c: Ditto. * amd64-darwin-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * amd64-sol2-tdep.c: Ditto. * amd64-tdep.c: Ditto. * amd64-fbsd-tdep.c: Ditto. * amd64-nbsd-tdep.c: Ditto. * amd64-obsd-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * arm-tdep.c: Ditto. * arm-tdep.h: Ditto. * armnbsd-nat.c: Ditto. * avr-tdep.c: Ditto. * bfin-tdep.c: Ditto. * bsd-kvm.c: Ditto. * c-typeprintc: Ditto. * c-valprint.c: Ditto. * coff-pe-read.h: Ditto. * coffreead.c: Ditto. * cris-tdep.c: Ditto. * d-lang.c: Ditto. * darwin-nat-info.c: Ditto. * darwin-nat.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * dcache.c: Ditto. * dcache.h: Ditto. * dec-thread.c: Ditto. * defs.h: Ditto. * demangle.c: Ditto. * dicos-tdep.c: Ditto. * dictionary.c: Ditto. * dictionary.h: Ditto. * dink32-rom.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dsrec.c: Ditto. * dummy-frame.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * environ.c: Ditto. * eval.c: Ditto. * event-top.h: Ditto. * exceptions.c: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-exp.y: Ditto. * f-lang.c: Ditto. * f-lang.h: Ditto. * f-typeprint.c: Ditto. * f-valprint.c: Ditto. * fbsd-nat.c: Ditto. * findvar.c: Ditto. * fork-child.c: Ditto. * frame.c: Ditto. * frame.h: Ditto. * frv-linux-tdep.c: Ditto. * frv-tdep.c: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_string.h: Ditto. * gdb_thread_db.h: Ditto. * gdb_wait.h: Ditto. * gdbarch.sh: Ditto. * gdbcore.h: Ditto. * gdbthread.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * gnu-nat.c: Ditto. * gnu-nat.h: Ditto. * gnu-v2-abi.c: Ditto. * gnu-v3-abi.c: Ditto. * go32-nat.c: Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
* fix style violation in ada-tasks.c commentJoel Brobecker2011-01-061-1/+1
| | | | | | gdb/ChangeLog: * ada-tasks.c: Fix style violation in comment.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* [Ada/tasks] Optimize ATCB lookupsJoel Brobecker2010-11-231-5/+14
| | | | | | | | | | | | | | | | Type symbols that are used to decode the Ada task control block may be duplicated in any unit that uses a tasking feature; an Ada lookup of these symbols would collect all the duplicated instances and could provoke the load of a huge amount of debug symbols in the process. However, when decoding the task information, we are only interested in one instance; and we have the full name of the symbol anyway. So use a C lookup instead of an Ada lookup. 2010-11-05 Jerome Guitton <guitton@adacore.com> * ada-tasks.c (get_tcb_types_info): Use C lookups to get ATCB symbols.
* [Ada] Add ada-tasks.c:iterate_over_live_ada_tasksJoel Brobecker2010-09-281-0/+21
| | | | | | | | | This new function is needed by the ravenscar-thread layer. gdb/ChangeLog: * ada-tasks.c (iterate_over_live_ada_tasks): New function. * ada-lang.h (iterate_over_live_ada_tasks): Declare.
* [Ada] Do not compute task ptid when debugging core fileJoel Brobecker2010-09-221-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After thread support over core files was added for GNU/Linux was added, we started noticing the following type of crash when trying to perform task switches (this is a bit accademic, since task switching is not supported when debugging core files - this is what our testcase was verifying). (please check out the comment inside ada-tasks.c:task_command for more details on this topic) The reason for the crash comes from the fact that the GNU/Linux thread layer now gets pushed on the target stack, causing the associated to_get_ada_task_ptid target method to be activated. This routine makes the assumption that, for all threads, the private area is not NULL. This is incorrect in the case of core files, as the core layer creates some threads with no private data. But, taking a step back, we don't need to try to compute the task ptid, as we'll never be using it anyways (we only use it for task switching). So the fix is to avoid the ptid computation altogether when debugging a core file. gdb/ChangeLog: * ada-tasks.c (read_atcb): Do not compute the task ptid when debugging a core file.
* 2010-05-06 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-061-1/+0
| | | | | | | | | | | | | | | | * ada-lang.c (add_defn_to_vec): Delete unused variable. (decode_constrained_packed_array_type): Delete unused variable. (add_defn_to_vec): Delete unused variable. (symbol_completion_match): Delete unused variable. (value_tag_from_contents_and_address): Delete unused variable. (ada_evaluate_subexp): Delete unused variable. * c-lang.c (classify_type): Delete unused variable. * f-lang.c (f_printstr): Delete unused variable. * objc-lang.c (objc_printstr): Delete unused variable. * ada-tasks.c (get_known_tasks_addr): Delete unused variable. * jv-lang.c (type_from_class): ifdef unused variable. (java_class_name_from_physname): Delete unused variable. * m2-lang.c (m2_printstr): Delete unused variable.
* Avoid switch to invalid ptid during Ada task switch.Joel Brobecker2010-03-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to prevent an internal error during an Ada task switch. A task switch is simply a thread switch under the hood. What we do is collect the info from the Ada Task Control Block, deduce the associated thread ptid, and then switch to that thread. If the thread ptid computation routine has not been implemented for the target, of if there is a bug, then we end up computing a bogus ptid which GDB does not know about, which eventually leads to an assertion failure: (gdb) task 1 [New Thread 5715] /[...]/gdb/thread.c:595: internal-error: is_thread_state: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) When this happens, it's just nicer for the user to print an error message, and cancel the task switch. After this patch is applied, this is what we get: (gdb) task 1 [New Thread 10250] Unable to compute thread ID for task 1. Cannot switch to this task. gdb/ChangeLog: * ada-tasks.c (task_command_1): Check that the task ptid is valid before doing the associated thread switch.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+1
| | | | Automatic update by copyright.sh.
* Fix break *FUN'address task NUM.Joel Brobecker2010-01-011-0/+1
| | | | | | * ada-lex.l (task): New rule. * ada-lang.c (valid_task_id): Make sure the Ada task list has been built before using it.
* * defs.h (strlen_paddr, paddr, paddr_nz): Remove.Ulrich Weigand2009-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (paddress): Add GDBARCH parameter. * utils.c (strlen_paddr, paddr, paddr_nz): Remove. (paddress): Add GDBARCH parameter, use it instead of current_gdbarch. * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter. * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter, use it instead of current_gdbarch. Update calls to ui_out_field_core_addr to pass architecture: * ada-lang.c (print_one_exception): Update. * breakpoint.c (print_one_breakpoint_location, print_one_exception_catchpoint): Update. * disasm.c (dump_insns): Update. * darwin-nat-info.c (darwin_debug_regions_recurse): Update. * mi/mi-main.c (mi_cmd_data_read_memory): Update. * mi/mi-symbol-cmds.c: Include "objfiles.h". (mi_cmd_symbol_list_lines): Update. * stack.c (print_frame_info, print_frame): Update. Update callers of paddress to pass architecture: * ada-tasks.c (info_task): Update. * ada-valprint.c (ada_val_print_1): Update. * annotate.c (annotate_source, annotate_frame_begin): Update. * breakpoint.c (insert_bp_location, describe_other_breakpoints, mention): Update. * cli/cli-cmds.c (edit_command, list_command, print_disassembly): Update. * corefile.c (memory_error): Update. * c-valprint.c (print_function_pointer_address, c_val_print): Update. * disasm.c (dis_asm_print_address): Update. * exec.c (print_section_info): Update. * f-valprint.c (f_val_print): Update. * infcmd.c: Include "arch-utils.h". (jump_command, program_info): Update. * linux-fork.c: Include "arch-utils.h". (info_forks_command): Update. * m2-valprint.c (print_function_pointer_address, print_unpacked_pointer, print_variable_at_address, m2_val_print): Update. * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command): Update. * printcmd.c (print_address, print_address_demangle, address_info): Update. * p-valprint.c (pascal_val_print): Update. * source.c: Include "arch-utils.h". (line_info): Update. * stack.c (frame_info, print_block_frame_labels): Update. * symfile.c (add_symbol_file_command, list_overlays_command): Update. * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol, print_partial_symbols, maintenance_info_psymtabs, maintenance_check_symtabs): Update. * symtab.c (find_pc_sect_symtab): Update. * target.c (deprecated_debug_xfer_memory): Update. * tracepoint.c (scope_info): Update. * tui/tui-stack.c (tui_make_status_line): Update. * valprint.c (val_print_string): Update. Update callers of paddr_nz to use paddress instead (keeping user-visible output identical): * alpha-tdep.c (alpha_heuristic_proc_start): Update. * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn, amd64_displaced_step_fixup): Update. * arch-utils.c (simple_displaced_step_copy_insn): Update. * auxv.c (fprint_target_auxv): Update. * breakpoint.c (insert_single_step_breakpoint): Update. * buildsym.c (finish_block): Update. * cli/cli-dump.c (restore_section_callback): Update. * fbsd-nat.c (fbsd_find_memory_regions): Update. * frame.c (frame_unwind_register_value): Update. * gcore.c (gcore_create_callback): Update. * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update. * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm, i386_record_lea_modrm_addr, i386_record_lea_modrm, i386_process_record): Update. * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id, ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id, ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update. * infrun.c (displaced_step_prepare, displaced_step_fixup, handle_inferior_event, insert_step_resume_breakpoint_at_sal, insert_longjmp_resume_breakpoint): Update. * linux-nat.c (linux_nat_find_memory_regions): Update. * linux-record.c (record_linux_system_call): Update. * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call, mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update. * monitor.c (monitor_error, monitor_remove_breakpoint): Update. * record.c (record_arch_list_add_mem, record_wait, record_xfer_partial): Update. * remote-mips.c (mips_fetch_word, mips_check_lsi_error, mips_common_breakpoint): Update. * remote-sim.c (gdbsim_xfer_inferior_memory): Update. * rs6000-tdep.c (ppc_displaced_step_fixup): Update. * solib-som.c (som_current_sos): Update. * symfile.c (load_progress, generic_load): Update. * symfile-mem.c (add_vsyscall_page): Update. * valops.c (value_fetch_lazy): Update. * windows-tdep.c (windows_xfer_shared_library): Update. Update callers of paddr_nz to use paddress instead (changing user-visible output to make it more correct): * dwarf2loc.c (locexpr_describe_location): Update. * ia64-tdep.c (ia64_memory_insert_breakpoint, ia64_memory_remove_breakpoint): Update. * jv-valprint.c (java_value_print): Update. * m32c-tdep.c (m32c_m16c_address_to_pointer): Update. * monitor.c (monitor_read_memory): Update. Update callers of paddr to use paddress instead (changing user-visible output to make it more correct): * arm-tdep.c (arm_push_dummy_call): Update. * breakpoint.c (insert_bp_location, create_thread_event_breakpoint, create_breakpoint): Update. * darwin-nat-info.c (darwin_debug_regions): Update. * dcache.c (dcache_info): Update. * dsrec.c (load_srec, make_srec): Update. * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program, dwarf2_frame_cache): Update. * gcore.c (gcore_copy_callback): Update. * gnu-nat.c (gnu_xfer_memory): Update. * mips-linux-nat.c (mips_show_dr): Update. * monitor.c (monitor_write_memory, monitor_insert_breakpoint, monitor_remove_breakpoint): Update. * remote.c (compare_sections_command): Update. * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint, m32r_remove_breakpoint, m32r_insert_watchpoint, m32r_remove_watchpoint): Update. * sol-thread.c (info_cb): Update. * symfile.c (load_progress): Update. Update callers of paddress or paddr_nz to use hex_string instead (changes output of internal/error/debug messages only): * dwarf2read.c (dump_die_shallow): Update. * frame.c (fprint_field, fprint_frame, frame_pc_unwind, get_frame_func, create_new_frame): Update. * hppa-tdep.c (find_unwind_entry, unwind_command): Update. * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x, ia64_get_dyn_info_list): Update. * maint.c (maintenance_translate_address): Update. * mi/mi-cmd-var.c (mi_cmd_var_create): Update. * target.c (target_flash_erase): Update. Update callers of paddr/paddr_nz to use phex/phex_nz instead, using an appropriate address size. Remove use of strlen_paddr. * exec.c (exec_files_info): Update. * i386-nat.c (i386_show_dr): Update. * remote.c (remote_flash_erase): Update. * m32r-rom.c (m32r_load_section): Update. * monitor.c (monitor_vsprintf, monitor_store_register): Update. * remote.c (remote_check_symbols, remote_search_memory): Update. * remote-mips.c (mips_request, mips_common_breakpoint): Update. * scm-valprint.c (scm_ipruk, scm_scmval_print): Update. * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update. * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs): Update. * xcoffsolib.c (sharedlibrary_command): Update. * maint.c (maint_print_section_info): Add ADDR_SIZE parameter. Use hex_string_custom instead of paddr. (print_bfd_section_info): Pass address size. (print_objfile_section_info): Likewise. * annotate.h (annotate_source): Add GDBARCH parameter. (annotate_frame_begin): Likewise. * annotate.c (annotate_source): Add GDBARCH parameter. (annotate_frame_begin): Likewise. * source.c (identify_source_line): Update call to annotate_source. * stack.c (print_frame_info, print_frame): Update call to annotate_frame_begin. * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter. (create_breakpoint, create_ada_exception_breakpoint): Update call. * stack.c (print_block_frame_labels): Add GDBARCH parameter. (print_frame_label_vars): Update call. * symmisc.c (print_partial_symbols): Add GDBARCH parameter. (dump_psymtab): Update call to print_partial_symbols. (struct print_symbol_args): Add GDBARCH member. (dump_symtab_1): Set print_symbol_args architecture member. (print_symbol): Use it. * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH parameter. * windows-tdep.c (windows_xfer_shared_library): Likewise. * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member. (core_process_module_section): Pass architecture from cpms_data to windows_xfer_shared_library. (windows_core_xfer_shared_libraries): Initialize cmps_data architecture member. * windows-nat.c (windows_xfer_shared_libraries): Pass architecture to windows_xfer_shared_library. * defs.h (print_address): Add GDBARCH parameter. * printcmd.c (print_address): Add GDBARCH parameter. (print_scalar_formatted, do_examine): Update call. * findcmd.c (find_command): Update call. * tracepoint.c: Include "arch-utils.h". (trace_find_line_command): Update call. * tui/tui-disasm.c (tui_disassemble): Update call. * value.h (print_address_demangle): Add GDBARCH parameter. * printcmd.c (print_address_demangle): Add GDBARCH parameter. * c-valprint.c (print_function_pointer_address, c_val_print): Update call. * f-valprint.c (f_val_print): Update call. * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call. * jv-valprint.c (java_val_print): Update call. * m2-valprint.c (print_function_pointer_address, m2_val_print): Update call. * p-valprint.c (pascal_val_print): Update call. * disasm.c (gdb_disassemble_info): Install architecture into di.application_data field. testsuite/ChangeLog: * gdb.threads/tls-shared.exp: Update to locexpr_describe_location change to prefix TLS offset in hex with 0x. doc/ChangeLog: * gdbint.texinfo (Item Output Functions): Update signature for ui_out_field_core_addr.
* * value.h (value_subscript, value_subscripted_rvalue,Ulrich Weigand2009-06-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value_bitstring_subscript, value_ptradd): Use LONGEST instead of value as type of the index argument. (value_ptrsub): Remove. * valarith.c (value_subscript, value_subscripted_rvalue, value_bitstring_subscript, value_ptradd): Use LONGEST instead of value as type of the index argument. (value_ptrsub): Remove. * wrapper.h (gdb_value_subscript): Use LONGEST instead of value as type of the index argument. * wrapper.c (gdb_value_subscript): Likewise. Update calls to gdb_value_subscript, value_subscript, value_subscripted_rvalue, value_bitstring_subscript and value_ptradd to use LONGEST instead of value as index argument type. Use value_ptradd instead of value_ptrsub. * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript, ada_tag_name_2): Update. * ada-tasks.c (read_atcb): Update. * eval.c (evaluate_subexp_standard): Update. * valarith.c (value_subscript): Update. * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update. * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset, gnuv3_method_ptr_to_value): Update. * jv-lang.c (evaluate_subexp_java): Update. * m2-lang.c (evaluate_subexp_modula2): Update. * python/python-value.c (valpy_getitem, valpy_binop): Update. * wrapper.c (gdb_value_subscript): Update. * varobj.c (c_describe_child): Update.
* * ada-tasks.c (read_known_tasks_array): Use target_gdbarch insteadUlrich Weigand2009-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | of current_gdbarch. * aix-thread.c (pd_enable): Likewise. * amd64-linux-nat.c (ps_get_thread_area): Likewise. * bsd-uthread.c (bsd_uthread_activate): Likewise. * linux-nat.c (linux_nat_info_proc_cmd): Likewise. * linux-thread-db.c (enable_thread_event): Likewise. * monitor.c (monitor_write_memory, monitor_read_memory): Likewise. * nto-procfs.c (procfs_open): Likewise. * procfs.c (invalidate_cache, procfs_insert_watchpoint, info_proc_mappings, info_mappings_callback): Likewise. * record.c (record_open): Likewise. * rs6000-nat.c (ARCH64): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise. (darwin_bfd_open): Likewise. * memattr.c (mem_info_command): Likewise. * windows-nat.c (win32_resume): Use current regcache architecture instead of current_gdbarch. * dbug-rom.c (dbug_regname): Remove check against number of registers in current_gdbarch. * solib-pa64.c (read_dynamic_info): Remove unused variable.
* 2009-05-27 Tom Tromey <tromey@redhat.com>Tom Tromey2009-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paul Pluzhnikov <ppluzhnikov@google.com> * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use value_address. * cli/cli-dump.c (dump_value_to_file): Use value_address. * valprint.c (common_val_print): Likewise. * v850-tdep.c (v850_push_dummy_call): Use value_address. * tracepoint.c (encode_actions): Use value_address. * printcmd.c (print_formatted): Use value_address. (x_command): Likewise. * p-valprint.c (pascal_object_print_static_field): Use value_address. * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address. * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address. * m32r-tdep.c (m32r_push_dummy_call): Use value_address. * jv-valprint.c (java_value_print): Use value_address. * infcall.c (find_function_addr): Use value_address. * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address. * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address. * frv-tdep.c (frv_push_dummy_call): Use value_address. * frame.c (frame_register_unwind): Use value_address. (frame_unwind_register_value): Likewise. * darwin-nat-info.c (info_mach_region_command): Use value_address. * cp-valprint.c (cp_print_static_field): Use value_address. * c-valprint.c (c_value_print): Use value_address. * breakpoint.c (update_watchpoint): Use value_address. (can_use_hardware_watchpoint): Likewise. * ada-valprint.c (ada_val_print_1): Use value_address. (ada_value_print): Likewise. * ada-tasks.c (read_fat_string_value): Use value_address. * jv-lang.c (java_link_class_type): Use set_value_address. (java_link_class_type): Likewise. (get_java_utf8_name): Use value_address. (type_from_class): Likewise. (java_link_class_type): Likewise. * findvar.c (value_of_register): Use set_value_address. (read_var_value): Likewise. (read_var_value): Likewise. * eval.c (evaluate_subexp_standard): Use set_value_address. (evaluate_subexp_standard): Use value_address. * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address. * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address. (ada_value_primitive_packed_val): Likewise. (ensure_lval): Likewise. (thin_data_pntr): Use value_address. (desc_bounds): Likewise. (ada_value_primitive_packed_val): Likewise. (value_assign_to_component): Likewise. (ensure_lval): Likewise. (make_array_descriptor): Likewise. (ada_to_fixed_value): Likewise. (unwrap_value): Likewise. * value.c (deprecated_value_address_hack): Remove. (value_address): New function. (value_raw_address): Likewise. (set_value_address): Likewise. (value_fn_field): Use set_value_address. (value_from_contents_and_address): Likewise. (value_fn_field): Likewise. (allocate_value_lazy): Don't use VALUE_ADDRESS. (value_as_address): Use value_address. (value_static_field): Likewise. * valops.c (search_struct_field): Use set_value_address. (value_at): Likewise. (value_at_lazy): Likewise. (value_repeat): Likewise. (value_cast_structs): Use value_address. (value_cast): Likewise. (value_fetch_lazy): Likewise. (value_assign): Likewise. (value_repeat): Likewise. (address_of_variable): Likewise. (value_coerce_array): Likewise. (value_coerce_function): Likewise. (value_addr): Likewise. (search_struct_field): Likewise. (search_struct_method): Likewise. (find_method_list): Likewise. (value_struct_elt_for_reference): Likewise. (value_full_object): Likewise. * jv-valprint.c (java_value_print): Use set_value_address. * value.h (deprecated_value_address_hack): Remove. (VALUE_ADDRESS): Remove. (value_address): Declare. (value_raw_address): Declare. (set_value_address): Declare.
* * ada-tasks (task_command_1): Call target_find_new_threads.Joel Brobecker2009-04-231-0/+9
|
* Provide support for (Ada) task-specific breakpoints.Joel Brobecker2009-03-311-1/+1
| | | | | | | | | | | | | | | * ada-lang.h (ada_get_task_number): Add declaration. (breakpoint_ada_task_match): Delete declaration. * ada-tasks.c (ada_get_task_number): Make non-static. * breakpoint.h (struct breakpoint): Add field "task". * breakpoint.c (print_one_breakpoint_location): Add handling of task-specific breakpoints. (create_breakpoint, create_breakpoints, find_condition_and_thread): New parameter "task". (break_command_really): Update calls to find_condition_and_thread and create_breakpoints. (breakpoint_re_set_one): Update call to find_condition_and_thread. Set b->task.
* * ada-tasks.c (short_task_info): Eliminate the "Running" task state.Joel Brobecker2009-03-311-3/+0
|
* * ada-tasks.c (ada_task_is_alive): Move up and make static.Joel Brobecker2009-03-131-9/+9
| | | | * ada-lang.h (ada_task_is_alive): Remove declaration.
* * ada-tasks.c (task_states,long_task_states): Add new statesJoel Brobecker2009-03-121-5/+11
| | | | | Activating and Acceptor_Delay_Sleep. Update the description of state Acceptor_Sleep.
* Remove some unused routines.Joel Brobecker2009-03-031-37/+0
| | | | | | | | | * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing): Delete. * ada-lang.c (ada_task_list_iterator_ftype) (iterate_over_live_ada_tasks): Delete. * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks): Delete.
* 2008-02-21 Pedro Alves <pedro@codesorcery.com>Pedro Alves2009-02-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence a few -Wmissing-prototypes warnings. PR build/9877: * amd64-nat.c: Include "amd64-nat.h". * fork-child.c (_initialize_fork_child): Ditto. * gcore.c (_initialize_gcore): Ditto. * inf-ptrace.c: Include "inf-ptrace.h". (inf_ptrace_store_registers): Make it static. * linux-nat.c (linux_nat_terminal_ours): Make it static. (_initialize_linux_nat): Declare before definition. * linux-tdep.c: Include "linux-tdep.h". * linux-thread-db.c (_initialize_thread_db): Declare before definition. * proc-service.c (_initialize_proc_service): Ditto. * remote.c (remote_send_printf): Make it static. * solib.c: Include "solib.h". * symfile-mem.c (_initialize_symfile_mem): Declare before definition. * ada-lang.c (ada_la_decode, ada_match_name) (ada_suppress_symbol_printing, ada_is_array_type) (ada_value_ptr_subscript, ada_array_length) (ada_to_static_fixed_value): Make them static. (_initialize_ada_language): Declare before definition. * ada-tasks.c (ada_get_task_number, ada_get_environment_task) (ada_task_list_changed, ada_new_objfile_observer): Make them static. (_initialize_tasks): Declare before definition. * addrmap.c (_initialize_addrmap): Declare before definition. * auxv.c (default_auxv_parse): Make it static. * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make them static. * breakpoint.c (remove_sal): Add line break. (expand_line_sal_maybe): Make it static. * cp-name-parser.y: Include "cp-support.h". * cp-valprint.c (cp_find_class_member): Make it static. * eval.c (value_f90_subarray): Ditto. * exceptions.c (print_any_exception): Ditto. * findcmd.c (_initialize_mem_search): Declare before definition. * frame.c (frame_observer_target_changed): Make it static. * gnu-v3-abi.c (gnuv3_find_method_in): Make it static. * inf-child.c: Include "inf-child.h". * inferior.h (valid_inferior_id): Rename to ... (valid_gdb_inferior_id): ... this. * infrun.c (infrun_thread_stop_requested, siginfo_make_value): Make them static. * jv-lang.c (java_language_arch_info): Make it static. * m2-typeprint.c (m2_get_discrete_bounds): Ditto. * osdata.c (info_osdata_command): Make it static. * regcache.c (regcache_observer_target_changed): Make it static. * reverse.c (_initialize_reverse): Declare before definition. * stabsread.c (cleanup_undefined_types_noname) (cleanup_undefined_types_1): Make them static. * symfile.c (place_section): Make it static. * symtab.c (find_pc_sect_psymtab_closer): Make it static. * target-descriptions.c (_initialize_target_descriptions): Declare before definition. * target.c (default_get_ada_task_ptid, find_default_can_async_p) (find_default_is_async_p, find_default_supports_non_stop): Make them static. (target_supports_non_stop): Add prototype. (dummy_pid_to_str): Make it static. * utils.c (_initialize_utils): Declare before definition. * ada-exp.y (_initialize_ada_exp): Declare before definition. * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype. * target.h (struct target_ops): Add a prototype to the to_can_execute_reverse callback. * macroscope.c (_initialize_macroscope): Declare before definition. * cp-namespace.c (_initialize_cp_namespace): Declare before definition. * python/python.c (_initialize_python): Declare before definition. * tui/tui-command.c: Include "tui/tui-command.h". * tui/tui-data.c (init_content_element, init_win_info): Make them static. * tui/tui-disasm.c: Include "tui/tui-disasm.h". * tui/tui-interp.c (_initialize_tui_interp): Declare before definition. * tui/tui-layout.c: Include "tui/tui-layout.h". (_initialize_tui_layout): Declare before definition. * tui/tui-regs.c: Include "tui/tui-regs.h". (tui_display_reg_element_at_line): Make it static. (_initialize_tui_regs): Declare before definition. * tui/tui-stack.c (_initialize_tui_stack): Declare before definition. * tui/tui-win.c: Include "tui/tui-win.h". (_initialize_tui_win): Declare before definition. (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH. * tui/tui-win.h (tui_sigwinch_handler): Delete declaration. (tui_get_cmd_list): Add a prototype. * tui/tui-windata.c: Include tui-windata.h. * tui/tui-wingeneral.c (box_win): Make it static. * cli/cli-logging.c (show_logging_command): Make it static. (_initialize_cli_logging): Declare before definition. * mi/mi-common.c (_initialize_gdb_mi_common): Declare before definition.
* Include frame information for *stopped due to CLI commands.Vladimir Prus2009-02-141-1/+1
| | | | | | | | | | | | * ada-tasks.c (ada_normal_stop_observer): Adjust prototype. * infcmd.c (finish_command_continuation): Pass '1' for 'print_frame' parameter to the observer. * infrun.c (normal_stop): Don't print mi-specific information here. Pass 'stop_print_frame' to the 'print_frame' parameter of the observer. * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype. If we need to print frame, and current uiout is not the MI one, print frame again.
* Updated copyright notices for most files.Joel Brobecker2009-01-031-2/+2
|
* * ada-tasks.c (task_states, long_task_states): Use constant N_()Jan Kratochvil2008-10-231-27/+27
| | | | | initializer. Define the strings as const. (short_task_info, info_task): Translate the strings above.
* * target.h (struct target_ops): Add new field to_get_ada_task_ptid.Joel Brobecker2008-10-221-0/+991
| | | | | | | | | | | | | | | | | | | | | | | | (target_get_ada_task_ptid): New macro. * target.c (default_get_ada_task_ptid): New function. (update_current_target): Inherit field default_get_ada_task_ptid. (update_current_target): Make default_get_ada_task_ptid the default value for field to_get_ada_task_ptid. * ada-lang.h (struct task_control_block): Delete. Never used. (struct task_ptid, task_ptid_t, struct task_entry, task_list): Likewise. (struct ada_task_info): New. (ada_task_is_alive, ada_find_printable_frame) (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add declarations. (ada_build_task_list): Update prototype. (init_task_list, ada_is_exception_breakpoint): Remove prototypes. * ada-lang.c (ada_find_printable_frame): Make non-static. * ada-tasks.c: New file. * Makefile.in (SFILES): Add ada-tasks.c. (COMMON_OBS): Add ada-tasks.o. * linux-thread-db.c (thread_db_find_thread_from_tid) (thread_db_get_ada_task_ptid): New functions. (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
* Removed ada-tasks.c, as ACT plans to rewrite it extensively beforePaul N. Hilfinger2004-07-091-1447/+0
| | | | submission.