Convert siginfo for x32 in gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2
3 * linux-x86-low.c (compat_x32_clock_t): New.
4 (compat_x32_siginfo_t): Likewise.
5 (compat_x32_siginfo_from_siginfo): Likewise.
6 (siginfo_from_compat_x32_siginfo): Likewise.
7 (linux_is_elf64): Likewise.
8 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9 and siginfo_from_compat_x32_siginfo for x32.
10 (x86_arch_setup): Set linux_is_elf64.
11
12 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
13
14 PR gdb/13969
15 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
16 e_machine field.
17 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
18 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
19 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
20 compatible with process.
21
22 2012-04-12 Yao Qi <yao@codesourcery.com>
23
24 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
25 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
26 (install-only, install-info, clean): Handle sub dir gnulib.
27 (all-lib, am--refresh): New targets.
28 (memmem.o): Remove target.
29 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
30 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
31 (AC_REPLACE_FUNCS): Remove memmem.
32 Invoke gl_INIT and AM_INIT_AUTOMAKE.
33 (AC_OUTPUT): Generate Makefile in gnulib/.
34 * aclocal.m4, config.in, configure: Regenerated.
35
36 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
37
38 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
39
40 2012-04-05 Pedro Alves <palves@redhat.com>
41
42 -Werror=strict-aliasing
43
44 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
45 pointer.
46
47 2012-04-04 Pedro Alves <palves@redhat.com>
48
49 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
50 (sparc_store_gregset_from_stack, sparc_store_gregset)
51 (sparc_breakpoint_at): Fix formatting.
52
53 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
54
55 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
56 are available.
57 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
58 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
59 * config.in: Regenerate.
60 * configure: Likewise.
61
62 2012-03-29 Pedro Alves <palves@redhat.com>
63
64 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
65 Correct ptrace arguments.
66
67 2012-03-28 Pedro Alves <palves@redhat.com>
68
69 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
70 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
71 (IA64_FR1_REGNUM): New defines.
72 (ia64_fetch_register): New.
73 (the_low_target): Install it.
74 * linux-low.h (struct linux_target_ops) <fetch_register>: New
75 field.
76 * linux-low.c (linux_fetch_registers): Try the
77 the_low_target.fetch_register hook first.
78
79 * linux-arm-low.c (the_low_target): Adjust.
80 * linux-bfin-low.c (the_low_target): Adjust.
81 * linux-cris-low.c (the_low_target): Adjust.
82 * linux-crisv32-low.c (the_low_target): Adjust.
83 * linux-m32r-low.c (the_low_target): Adjust.
84 * linux-m68k-low.c (the_low_target): Adjust.
85 * linux-mips-low.c (the_low_target): Adjust.
86 * linux-ppc-low.c (the_low_target): Adjust.
87 * linux-s390-low.c (the_low_target): Adjust.
88 * linux-sh-low.c (the_low_target): Adjust.
89 * linux-sparc-low.c (the_low_target): Adjust.
90 * linux-tic6x-low.c (the_low_target): Adjust.
91 * linux-x86-low.c (the_low_target): Adjust.
92 * linux-xtensa-low.c (the_low_target): Adjust.
93
94 2012-03-26 Pedro Alves <palves@redhat.com>
95
96 * server.c (handle_qxfer_libraries): Don't bail early if
97 the_target->qxfer_libraries_svr4 is not NULL.
98
99 2012-03-26 Pedro Alves <palves@redhat.com>
100
101 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
102
103 2012-03-23 Pedro Alves <palves@redhat.com>
104
105 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
106 "library-list-svr4" element's start tag when the the DSO list is
107 empty.
108
109 2012-03-23 Pedro Alves <palves@redhat.com>
110
111 * linux-low.c (read_one_ptr): Read the inferior's pointer through
112 a variable whose type size is the same as the inferior's pointer
113 size.
114
115 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
116
117 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
118 struct siginfo.
119 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
120 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
121 * linux-low.h: Include <signal.h>.
122 (struct siginfo): Remove forward declaration.
123 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
124 struct siginfo.
125
126 2012-03-21 Mike Frysinger <vapier@gentoo.org>
127
128 * .gitignore: Ignore more files.
129
130 2012-03-19 Pedro Alves <palves@redhat.com>
131 Jan Kratochvil <jan.kratochvil@redhat.com>
132
133 * server.c (cont_thread, general_thread): Add describing comments.
134 (start_inferior): Clear `cont_thread'.
135 (handle_v_cont): Don't set `cont_thread' if resuming all threads
136 of a process.
137
138 2012-03-15 Yao Qi <yao@codesourcery.com>
139
140 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
141 handling to ...
142 (cmd_qtdp): ... here.
143
144 2012-03-15 Yao Qi <yao@codesourcery.com>
145
146 * tracepoint.c (struct tracepoint_action_ops): New.
147 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
148 (m_tracepoint_action_download): New.
149 (r_tracepoint_action_download): New.
150 (x_tracepoint_action_download): New.
151 (l_tracepoint_action_download): New.
152 (add_tracepoint_action): Install `action->ops' according type.
153 (download_tracepoint_1): Move code `download' function pointer
154 of various tracepoint_action_ops.
155
156 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
157
158 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
159 linux_ptrace_attach_warnings.
160
161 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
162
163 * Makefile.in (linux-ptrace.o): New.
164 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
165 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
166 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
167 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
168 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
169 of these targets.
170 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
171
172 2012-03-08 Yao Qi <yao@codesourcery.com>
173 Pedro Alves <palves@redhat.com>
174
175 Fix PR server/13392.
176 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
177 offset of JMP insn.
178 * tracepoint.c (remove_tracepoint): New.
179 (cmd_qtdp): Call remove_tracepoint when failed to install.
180
181 2012-03-07 Pedro Alves <palves@redhat.com>
182
183 * linux-low.c (get_detach_signal): New.
184 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
185 Pass on pending signals to PTRACE_DETACH. Check the result of the
186 ptrace call.
187 * server.c (program_signals, program_signals_p): New.
188 (handle_general_set): Handle QProgramSignals.
189 * server.h (program_signals, program_signals_p): Declare.
190
191 2012-03-05 Pedro Alves <palves@redhat.com>
192 Jan Kratochvil <jan.kratochvil@redhat.com>
193
194 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
195 New comment why.
196
197 2012-03-03 Yao Qi <yao@codesourcery.com>
198
199 * tracepoint.c (tracepoint_look_up_symbols): Update call to
200 agent_look_up_symbols.
201
202 2012-03-03 Yao Qi <yao@codesourcery.com>
203
204 * Makefile.in (linux-low.o): Keep dependence on agent.h.
205 (linux-x86-low.o): Likewise.
206 * server.h: Remove in_process_agent_loaded.
207 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
208 common/agent.c.
209 Update callers.
210
211 2012-03-03 Yao Qi <yao@codesourcery.com>
212
213 * tracepoint.c (gdb_agent_capability): New global.
214 (in_process_agent_loaded_ust): Renamed to
215 `in_process_agent_supports_ust'.
216 Update callers.
217 (in_process_agent_supports_ust): Call agent_capability_check.
218 (clear_installed_tracepoints): Assert that agent supports
219 agent.
220
221 2012-03-03 Yao Qi <yao@codesourcery.com>
222
223 * linux-low.c (linux_supports_agent): New.
224 (linux_target_ops): Initialize field `supports_agent' with
225 linux_supports_agent.
226 * target.h (struct target_ops) <supports_agent>: New.
227 (target_supports_agent): New macro.
228 * server.c (handle_general_set): Handle packet 'QAgent'.
229 (handle_query): Send `QAgent+'.
230 * Makefile.in (server.o): Depends on agent.h.
231
232 2012-03-03 Yao Qi <yao@codesourcery.com>
233
234 * Makefile.in (OBS): Add agent.o.
235 Add new rule for agent.o.
236 Track dependence of tracepoint.c on agent.h.
237 * tracepoint.c (run_inferior_command_1):
238 (run_inferior_command): Call agent_run_command.
239 (gdb_ust_connect_sync_socket): Deleted. Move it to
240 common/agent.c.
241 (resume_thread, stop_thread): Likewise.
242 (gdb_ust_socket_init): Renamed to ...
243 (gdb_agent_socket_init): ... New.
244 (gdb_ust_thread): Renamed to ...
245 (gdb_agent_helper_thread): ... New.
246 (gdb_ust_init): Move some code to ...
247 (gdb_agent_init): ... here. New.
248 [HAVE_UST]: Call gdb_ust_init.
249 (initialize_tracepoint_ftlib): Call gdb_agent_init.
250 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
251 * config.in, configure: Regenerated.
252
253 2012-03-02 Pedro Alves <palves@redhat.com>
254
255 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
256 * linux-low.c (struct simple_pid_list): New.
257 (stopped_pids): New a struct simple_pid_list pointer.
258 (add_to_pid_list, pull_pid_from_list): New.
259 (handle_extended_wait): Don't assume the first signal new children
260 report is SIGSTOP. Adjust call to pull_pid_from_list.
261 (linux_wait_for_lwp): Adjust.
262
263 2012-03-02 Yao Qi <yao@codesourcery.com>
264
265 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
266 debug log.
267
268 2012-03-02 Yao Qi <yao@codesourcery.com>
269
270 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
271 `stop_pc' and `tpoint'. Update caller.
272
273 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
274
275 * linux-low.h (linux_target_ops): Add regset_bitmap member.
276 * linux-low.c (use_linux_regsets): New macro.
277 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
278 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
279 (linux_register_in_regsets): New function.
280 (usr_fetch_inferior_registers): Skip registers covered by
281 regsets.
282 (usr_store_inferior_registers): Likewise.
283 (usr_fetch_inferior_registers): New macro.
284 (usr_store_inferior_registers): Likewise.
285 (linux_fetch_registers): Handle mixed regset/non-regset targets.
286 (linux_store_registers): Likewise.
287 * linux-mips-low.c (init_registers_mips_dsp_linux): New
288 prototype.
289 (init_registers_mips64_dsp_linux): Likewise.
290 (init_registers_mips_linux): New macro.
291 (init_registers_mips_dsp_linux): Likewise.
292 (mips_dsp_num_regs): Likewise.
293 (DSP_BASE, DSP_CONTROL): New fallback macros.
294 (mips_base_regs): New macro.
295 (mips_regmap): Use it. Fix the size.
296 (mips_dsp_regmap): New variable.
297 (mips_dsp_regset_bitmap): Likewise.
298 (mips_arch_setup): New function.
299 (mips_cannot_fetch_register): Use the_low_target.regmap rather
300 than mips_regmap.
301 (mips_cannot_store_register): Likewise.
302 (the_low_target): Update .arch_setup, .num_regs and .regmap
303 initializers. Add .regset_bitmap initializer.
304 * linux-arm-low.c (the_low_target): Add .regset_bitmap
305 initializer.
306 * linux-bfin-low.c (the_low_target): Likewise.
307 * linux-cris-low.c (the_low_target): Likewise.
308 * linux-crisv32-low.c (the_low_target): Likewise.
309 * linux-ia64-low.c (the_low_target): Likewise.
310 * linux-m32r-low.c (the_low_target): Likewise.
311 * linux-m68k-low.c (the_low_target): Likewise.
312 * linux-ppc-low.c (the_low_target): Likewise.
313 * linux-s390-low.c (the_low_target): Likewise.
314 * linux-sh-low.c (the_low_target): Likewise.
315 * linux-sparc-low.c (the_low_target): Likewise.
316 * linux-tic6x-low.c (the_low_target): Likewise.
317 * linux-x86-low.c (the_low_target): Likewise.
318 * linux-xtensa-low.c (the_low_target): Likewise.
319 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
320 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
321 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
322 srv_xmlfiles.
323 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
324 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
325
326 2012-02-29 Yao Qi <yao@codesourcery.com>
327 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
330 `step_over_finished' is true.
331
332 2012-02-27 Pedro Alves <palves@redhat.com>
333
334 * linux-low.c (pid_is_stopped): Delete, moved to common/.
335 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
336
337 2012-02-27 Pedro Alves <palves@redhat.com>
338
339 PR server/9684
340 * linux-low.c (pid_is_stopped): New.
341 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
342
343 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
344
345 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
346 of conditions.
347
348 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
349
350 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
351
352 2012-02-24 Luis Machado <lgustavo@codesourcery>
353
354 * server.c (handle_query): Advertise support for target-side
355 breakpoint condition evaluation.
356 (process_point_options): New function.
357 (process_serial_event): When inserting a breakpoint, check for
358 a target-side condition that should be evaluated.
359
360 * mem-break.c: Include regcache.h and ax.h.
361 (point_cond_list_t): New data structure.
362 (breakpoint) <cond_list>: New field.
363 (find_gdb_breakpoint_at): Make non-static.
364 (delete_gdb_breakpoint_at): Clear any target-side
365 conditions.
366 (clear_gdb_breakpoint_conditions): New function.
367 (add_condition_to_breakpoint): Likewise.
368 (add_breakpoint_condition): Likewise.
369 (gdb_condition_true_at_breakpoint): Likewise.
370 (gdb_breakpoint_here): Return result directly instead
371 of going through a local variable.
372
373 * mem-break.h (find_gdb_breakpoint_at): New prototype.
374 (clear_gdb_breakpoint_conditions): Likewise.
375 (add_breakpoint_condition): Likewise.
376 (gdb_condition_true_at_breakpoint): Likewise.
377
378 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
379 (need_step_over_p): Take target-side breakpoint condition into
380 consideration.
381
382 2012-02-24 Luis Machado <lgustavo@codesourcery>
383
384 * server.h: Include tracepoint.h.
385 (agent_mem_read, agent_get_trace_state_variable_value,
386 agent_set_trace_state_variable_value,
387 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
388 get_set_tsv_func_addr): New prototypes.
389
390 * ax.h: New include file.
391 * ax.c: New source file.
392
393 * tracepoint.c: Include ax.h.
394 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
395 agent_expr, eval_result_type): Move to ax.h.
396 (parse_agent_expr): Rename to ...
397 (gdb_parse_agent_expr): ... this, make it non-static and move
398 to ax.h.
399 (unparse_agent_expr) Rename to ...
400 (gdb_unparse_agent_expr): ... this, make it non-static and move
401 to ax.h.
402 (eval_agent_expr): Rename to ...
403 (eval_tracepoint_agent_expr): ... this.
404 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
405 forward declarations.
406 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
407 (agent_get_trace_state_variable_value): New function.
408 (agent_set_trace_state_variable_value): New function.
409 (cmd_qtdp): Call gdb_parse_agent_expr (...).
410 (response_tracepoint): Call gdb_unparse_agent_expr (...).
411 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
412 (condition_true_at_tracepoint): Likewise.
413 (parse_agent_expr): Rename to ...
414 (gdb_parse_agent_expr): ... this and move to ax.c.
415 (unparse_agent_expr): Rename to ...
416 (gdb_unparse_agent_expr): ... this and move to ax.c.
417 (gdb_agent_op_name): Move to ax.c.
418 (eval_agent_expr): Rename to ...
419 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
420 and move to ax.c.
421 (eval_tracepoint_agent_expr): New function.
422 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
423 non-static.
424 (current_insn_ptr, emit_error, struct bytecode_address): Move to
425 ax.c.
426 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
427 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
428 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
429 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
430 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
431 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
432 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
433 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
434 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
435 (compile_bytecodes): Remove forward declaration.
436 (is_goto_target): Move to ax.c.
437 (compile_bytecodes): Move to ax.c and call
438 agent_get_trace_state_variable_value (...) and
439 agent_set_trace_state_variable_value (...).
440
441 * Makefile.in: Update ax.c and IPA dependencies.
442
443 2012-02-24 Pedro Alves <palves@redhat.com>
444
445 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
446 (cmd_bigqtbuffer_circular): ... this. Only handle
447 'QTBuffer:circular:'.
448 (handle_tracepoint_general_set): Adjust.
449
450 2012-02-16 Yao Qi <yao@codesourcery.com>
451
452 * inferiors.c: Move code to ...
453 * dll.c: .... here. New.
454 * server.h: Declare clear_dlls.
455 * Makefile.in (SFILES): Add dll.c.
456 (OBS): Add dll.o
457 (dll.o): New rule.
458
459 2012-02-11 Yao Qi <yao@codesourcery.com>
460
461 * server.c: (handle_monitor_command): Add a new parameter
462 `own_buf'.
463 (handle_query): Update caller.
464
465 2012-02-09 Joel Brobecker <brobecker@adacore.com>
466
467 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
468 * configure, config.in: Regenerate.
469 * hostio.c: Provide an alternate implementation if HAVE_READLINK
470 is not defined.
471
472 2012-02-02 Pedro Alves <palves@redhat.com>
473
474 Try SIGKILL first, then PTRACE_KILL.
475 * linux-low.c (linux_kill_one_lwp): New.
476 (linux_kill_one_lwp): Rename to ...
477 (kill_one_lwp_callback): ... this. Use the new
478 linux_kill_one_lwp.
479
480 2012-02-02 Pedro Alves <palves@redhat.com>
481
482 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
483 inferior.
484
485 2012-01-27 Pedro Alves <palves@redhat.com>
486
487 * linux-low.c (linux_child_pid_to_exec_file): Delete.
488 (elf_64_file_p): Make static.
489 (linux_pid_exe_is_elf_64_file): New.
490 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
491 Delete declarations.
492 (linux_pid_exe_is_elf_64_file): Declare.
493 * linux-x86-low.c (x86_arch_setup): Use
494 linux_pid_exe_is_elf_64_file.
495
496 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
497
498 * linux-low.c (linux_wait_for_event_1): Rename to ...
499 (linux_wait_for_event): ... here and merge it with former
500 linux_wait_for_event - new variable wait_ptid, use it.
501 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
502
503 2012-01-23 Pedro Alves <palves@redhat.com>
504
505 * server.c (main): Avoid yet another case of infinite loop while
506 detaching/killing after a longjmp.
507
508 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
509
510 Code cleanup.
511 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
512
513 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
514
515 * hostio.c (handle_readlink): New function.
516 (handle_vFile): Call it to handle "vFile:readlink" packets.
517
518 2012-01-20 Pedro Alves <palves@redhat.com>
519 Ulrich Weigand <ulrich.weigand@linaro.org>
520
521 * server.c (handle_v_requests): Only support vAttach and vRun to
522 start multiple processes when in extended protocol mode.
523
524 2012-01-17 Pedro Alves <palves@redhat.com>
525
526 * tracepoint.c (initialize_tracepoint): Use mmap instead of
527 memalign plus mprotect to allocate the scratch buffer.
528
529 2012-01-13 Pedro Alves <palves@redhat.com>
530
531 * server.c (attach_inferior): Clear `cont_thread'.
532
533 2012-01-13 Pedro Alves <palves@redhat.com>
534
535 * server.c (main): Avoid infinite loop while detaching/killing
536 after a longjmp.
537
538 2012-01-09 Doug Evans <dje@google.com>
539
540 * server.c (start_inferior): Set last_ptid in --wrapper case.
541
542 2012-01-06 Yao Qi <yao@codesourcery.com>
543
544 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
545 defined.
546 [IN_PROCESS_AGENT] (debug_agent): New global variable.
547
548 2012-01-04 Yao Qi <yao@codesourcery.com>
549
550 * tracepoint.c (cmd_qtdp): Print debug message
551 for static tracepoint.
552
553 2012-01-04 Yao Qi <yao@codesourcery.com>
554
555 * tracepoint.c (trace_vdebug): Differentiate debug message
556 between gdbserver and IPA.
557
558 2012-01-03 Yao Qi <yao@codesourcery.com>
559
560 * tracepoint.c (tracepoint_was_hit): Don't collect for
561 static tracepoint.
562
563 2012-01-02 Joel Brobecker <brobecker@adacore.com>
564
565 * terminal.h: Reformat copyright header.
566
567 2012-01-02 Joel Brobecker <brobecker@adacore.com>
568
569 * server.c (gdbserver_version): Update copyright year.
570 * gdbreplay.c (gdbreplay_version): Likewise.
571
572 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
573
574 * linux-low.c (linux_create_inferior): Put empty if clause for write.
575
576 Revert:
577 2011-12-18 Hui Zhu <teawater@gmail.com>
578 * linux-low.c (linux_create_inferior): Save return value to ret.
579
580 2011-12-18 Hui Zhu <teawater@gmail.com>
581
582 * linux-low.c (linux_create_inferior): Save return value to ret.
583
584 2011-12-16 Doug Evans <dje@google.com>
585
586 * linux-low.c (linux_create_inferior): If stdio connection,
587 redirect stdin from /dev/null, stdout to stderr.
588 * remote-utils.c (remote_is_stdio): New static global.
589 (remote_connection_is_stdio): New function.
590 (remote_prepare): Handle stdio connection.
591 (remote_open): Ditto.
592 (remote_close): Don't close stdin for stdio connections.
593 (read_prim,write_prim): New functions. Replace all calls to
594 read/write to these.
595 * server.c (main): Watch for "-" argument. Move call to
596 remote_prepare before start_inferior.
597 * server.h (STDIO_CONNECTION_NAME): New macro.
598 (remote_connection_is_stdio): Declare.
599
600 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
601 in debugging output.
602
603 2011-12-15 Yao Qi <yao@codesourcery.com>
604
605 * tracepoint.c: Include sys/syscall.h.
606 (gdb_ust_thread): Remove preprocessor conditional.
607
608 2011-12-14 Pedro Alves <pedro@codesourcery.com>
609
610 * linux-low.c (linux_detach_one_lwp): Call
611 the_low_target.prepare_to_resume before detaching.
612
613 2011-12-14 Yao Qi <yao@codesourcery.com>
614
615 * tracepoint.c (gdb_ust_thread): Don't ignore return value
616 of write.
617
618 2011-12-14 Yao Qi <yao@codesourcery.com>
619
620 * i386-low.c (i386_low_stopped_data_address): Initialize local
621 variable `control'.
622
623 2011-12-13 Pedro Alves <pedro@codesourcery.com>
624
625 PR remote/13492
626
627 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
628 DR_CONTROL unless necessary. Extend comments.
629 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
630 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
631
632 2011-12-13 Yao Qi <yao@codesourcery.com>
633
634 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
635 macros.
636 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
637
638 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
639
640 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
641 Print new debug message for such case.
642
643 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
644
645 Fix overlapping memcpy.
646 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
647 the read_inferior_memory transfer.
648 (delete_fast_tracepoint_jump): New variable buf. Use it for the
649 write_inferior_memory transfer.
650 (set_fast_tracepoint_jump): New variable buf. Use it for the
651 read_inferior_memory and write_inferior_memory transfers.
652 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
653 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
654 Use it for the write_inferior_memory transfer.
655 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
656 buffers.
657
658 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
659
660 * linux-low.c (fetch_register, store_register): Make code
661 consistent, fix formatting.
662
663 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
664
665 * linux-low.c (usr_store_inferior_registers): Factor out code
666 to handle individual registers into...
667 (store_register): ... this new function.
668
669 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
670
671 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
672 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
673 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
674 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
675 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
676 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
677 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
678 (srv_xmlfiles): Add new XML files.
679
680 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
681 and <sys/uio.h>.
682 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
683 (init_registers_s390_linux32v1): Add prototype.
684 (init_registers_s390_linux32v2): Likewise.
685 (init_registers_s390_linux64v1): Likewise.
686 (init_registers_s390_linux64v2): Likewise.
687 (init_registers_s390x_linux64v1): Likewise.
688 (init_registers_s390x_linux64v2): Likewise.
689 (s390_num_regs): Increment to 52.
690 (s390_regmap): Add orig_r2 register.
691 (s390_num_regs_3264): Increment to 68.
692 (s390_regmap_3264): Add orig_r2 register.
693 (s390_collect_ptrace_register): Handle orig_r2 register.
694 (s390_supply_ptrace_register): Likewise.
695 (s390_fill_last_break): New function.
696 (s390_store_last_break): Likewise.
697 (s390_fill_system_call): New function.
698 (s390_store_system_call): Likewise.
699 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
700 register sets.
701 (s390_check_regset): New function.
702 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
703 NT_S390_SYSTEM_CALL regsets and use appropriate description.
704 Update target_regsets for available register sets.
705
706 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
707 Jan Kratochvil <jan.kratochvil@redhat.com>
708
709 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
710 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
711 New.
712 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
713 * linux-low.h (struct process_info_private): New member r_debug.
714 * server.c (handle_qxfer_libraries): Call
715 the_target->qxfer_libraries_svr4.
716 (handle_qxfer_libraries_svr4): New function.
717 (qxfer_packets): New entry "libraries-svr4".
718 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
719 * target.h (struct target_ops): New member qxfer_libraries_svr4.
720 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
721 PACKET_qXfer_libraries_svr4.
722
723 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
724
725 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
726 PSW address/mask between 8-byte and 16-byte formats.
727 (s390_supply_ptrace_register): Likewise.
728 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
729 basic addressing mode bit.
730
731 2011-11-24 Stan Shebs <stan@codesourcery.com>
732
733 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
734
735 2011-11-17 Stan Shebs <stan@codesourcery.com>
736
737 * tracepoint.c (struct tracepoint): New field traceframe_usage.
738 (tracing_start_time): New global.
739 (tracing_stop_time): New global.
740 (tracing_user_name): New global.
741 (tracing_notes): New global.
742 (tracing_stop_note): New global.
743 (cmd_qtstart): Set traceframe_usage, start_time.
744 (stop_tracing): Set stop_time.
745 (cmd_qtstatus): Report additional status.
746 (cmd_qtp): New function.
747 (handle_tracepoint_query): Call it.
748 (cmd_qtnotes): New function.
749 (handle_tracepoint_general_set): Call it.
750 (get_timestamp): Rename from tsv_get_timestamp.
751
752 2011-11-14 Stan Shebs <stan@codesourcery.com>
753 Kwok Cheung Yeung <kcy@codesourcery.com>
754
755 * linux-x86-low.c (small_jump_insn): New.
756 (i386_install_fast_tracepoint_jump_pad): Add arguments for
757 trampoline and error message, build a trampoline and issue a small
758 jump instruction to it.
759 (x86_install_fast_tracepoint_jump_pad): Add arguments for
760 trampoline and error message.
761 (x86_get_min_fast_tracepoint_insn_len): New.
762 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
763 * linux-low.h (struct linux_target_ops): Add arguments to
764 install_fast_tracepoint_jump_pad operation, add new operation.
765 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
766 arguments.
767 (linux_get_min_fast_tracepoint_insn_len): New function.
768 (linux_target_op): Add new operation.
769 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
770 (gdb_trampoline_buffer_end): Ditto.
771 (gdb_trampoline_buffer_error): Ditto.
772 (struct ipa_sym_addresses): Add fields for new IPA variables.
773 (symbol_list): Add entries for new IPA variables.
774 (struct tracepoint): Add fields to hold the address range of the
775 trampoline used by the tracepoint.
776 (trampoline_buffer_head): New static variable.
777 (trampoline_buffer_tail): Ditto.
778 (claim_trampoline_space): New function.
779 (have_fast_tracepoint_trampoline_buffer): New function.
780 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
781 structure.
782 (install_fast_tracepoint): Ditto, also add error buffer argument.
783 (cmd_qtminftpilen): New function.
784 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
785 (fast_tracepoint_from_trampoline_address): New function.
786 (fast_tracepoint_collecting): Handle trampoline as part of jump
787 pad space.
788 (set_trampoline_buffer_space): New function.
789 (initialize_tracepoint): Initialize new IPA variables.
790 * target.h (struct target_ops): Add arguments to
791 install_fast_tracepoint_jump_pad operation, add new
792 get_min_fast_tracepoint_insn_len operation.
793 (target_get_min_fast_tracepoint_insn_len): New.
794 (install_fast_tracepoint_jump_pad): Add arguments.
795 * server.h (IPA_BUFSIZ): Define.
796 * linux-i386-ipa.c: Include extra header files.
797 (initialize_fast_tracepoint_trampoline_buffer): New function.
798 (initialize_low_tracepoint): Call it.
799 * server.h (set_trampoline_buffer_space): Declare.
800 (claim_trampoline_space): Ditto.
801 (have_fast_tracepoint_trampoline_buffer): Ditto.
802
803 2011-11-14 Yao Qi <yao@codesourcery.com>
804
805 * server.c (handle_query): Handle InstallInTrace for qSupported.
806 * tracepoint.c (add_tracepoint): Sort list.
807 (install_tracepoint, download_tracepoint): New.
808 (cmd_qtdp): Call them to install and download tracepoints.
809 (sort_tracepoints): Removed.
810 (cmd_qtstart): Update.
811
812 2011-11-14 Yao Qi <yao@codesourcery.com>
813
814 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
815 * mem-break.h: Declare.
816 * tracepoint.c (cmd_qtstart): Move some code to ...
817 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
818 New.
819 (download_tracepoints): Move some code to ...
820 (download_tracepoint_1): ... here. New.
821
822 2011-11-08 Yao Qi <yao@codesourcery.com>
823
824 * remote-utils.c (relocate_instruction): A comment fix.
825
826 2011-11-07 Joel Brobecker <brobecker@adacore.com>
827
828 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
829 (i386_dr_low_get_control, i386_dr_low_get_status): Use
830 dr_status_mirror and dr_control_mirror from debug_reg_state.
831 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
832 (i386_initial_stuff): Remove use of deleted globals.
833 (i386_get_thread_context, i386_set_thread_context,
834 i386_thread_added): Use dr_status_mirror and dr_control_mirror
835 from debug_reg_state.
836
837 2011-11-05 Yao Qi <yao@codesourcery.com>
838
839 * tracepoint.c (gdb_collect): Loop over tracepoints of same
840 address as TPOINT's.
841
842 2011-11-02 Stan Shebs <stan@codesourcery.com>
843
844 * tracepoint.c (agent_mem_read_string): New function.
845 (eval_agent_expr): Call it for tracenz.
846 * server.c (handle_query): Report support for tracenz.
847
848 2011-11-02 Yao Qi <yao@codesourcery.com>
849
850 * tracepoint.c (cmd_qtstart): Remove unused local variables.
851
852 2011-11-02 Yao Qi <yao@codesourcery.com>
853
854 * target.h: Fix a typo in comment.
855
856 2011-10-31 Pedro Alves <pedro@codesourcery.com>
857
858 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
859 clobber the breakpoints' shadows with fast tracepoint jumps.
860 * mem-break.h (check_mem_write): Add `myaddr' parameter.
861 * target.c (write_inferior_memory): Also pass MYADDR down to
862 check_mem_write.
863
864 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
865
866 * configure.ac: Check support for personality routine.
867 * configure: Regenerate.
868 * config.in: Likewise.
869 * linux-low.c: Include <sys/personality.h>.
870 Define ADDR_NO_RANDOMIZE if necessary.
871 (linux_create_inferior): Disable address space randomization when
872 forking inferior, if requested.
873 (linux_supports_disable_randomization): New function.
874 (linux_target_ops): Install it.
875 * server.h (disable_randomization): Declare.
876 * server.c (disable_randomization): New global variable.
877 (handle_general_set): Handle QDisableRandomization.
878 (handle_query): Likewise for qSupported.
879 (main): Support --disable-randomization and --no-disable-randomization
880 command line arguments.
881 * target.h (struct target_ops): Add supports_disable_randomization.
882 (target_supports_disable_randomization): New macro.
883
884 2011-09-29 Mike Frysinger <vapier@gentoo.org>
885
886 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
887 ifdef check.
888 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
889 [!PT_GETDSBT] (target_loadmap): New definition.
890 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
891 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
892 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
893 and PT_GETDSBT to LINUX_LOADMAP.
894 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
895 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
896
897 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
898
899 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
900 (arm_linux_hwbp_cap): New static variable.
901 (arm_linux_get_hwbp_cap): Replace by ...
902 (arm_linux_init_hwbp_cap): ... this new function.
903 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
904 (arm_linux_get_hw_watchpoint_count): Likewise.
905 (arm_linux_get_hw_watchpoint_max_length): Likewise.
906 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
907 (arm_prepare_to_resume): Use perror_with_name instead of error.
908
909 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
910
911 * linux-arm-low.c: Include <signal.h>.
912 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
913 (struct arm_linux_hwbp_cap): New data type.
914 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
915 (struct arm_linux_hw_breakpoint): New data type.
916 (MAX_BPTS, MAX_WPTS): Define.
917 (struct arch_process_info, struct arch_lwp_info): New data types.
918 (arm_linux_get_hwbp_cap): New function.
919 (arm_linux_get_hw_breakpoint_count): Likewise.
920 (arm_linux_get_hw_watchpoint_count): Likewise.
921 (arm_linux_get_hw_watchpoint_max_length): Likewise.
922 (arm_hwbp_control_initialize): Likewise.
923 (arm_hwbp_control_is_enabled): Likewise.
924 (arm_hwbp_control_is_initialized): Likewise.
925 (arm_hwbp_control_disable): Likewise.
926 (arm_linux_hw_breakpoint_equal): Likewise.
927 (arm_linux_hw_point_initialize): Likewise.
928 (struct update_registers_data): New data structure.
929 (update_registers_callback: New function.
930 (arm_insert_point): Likewise.
931 (arm_remove_point): Likewise.
932 (arm_stopped_by_watchpoint): Likewise.
933 (arm_stopped_data_address): Likewise.
934 (arm_new_process): Likewise.
935 (arm_new_thread): Likewise.
936 (arm_prepare_to_resume): Likewise.
937 (the_low_target): Register arm_insert_point, arm_remove_point,
938 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
939 arm_new_thread, and arm_prepare_to_resume.
940
941 2011-09-15 Stan Shebs <stan@codesourcery.com>
942
943 * server.h (struct emit_ops): Add compare-goto fields.
944 * tracepoint.c (gdb_agent_op_sizes): New table.
945 (emit_eq_goto): New function.
946 (emit_ne_goto): New function.
947 (emit_lt_goto): New function.
948 (emit_le_goto): New function.
949 (emit_gt_goto): New function.
950 (emit_ge_goto): New function.
951 (is_goto_target): New function.
952 (compile_bytecodes): Recognize special cases of compare-goto
953 combinations and call specialized emitters for them.
954 * linux-x86-low.c (amd64_emit_eq_goto): New function.
955 (amd64_emit_ne_goto): New function.
956 (amd64_emit_lt_goto): New function.
957 (amd64_emit_le_goto): New function.
958 (amd64_emit_gt_goto): New function.
959 (amd64_emit_ge_goto): New function.
960 (amd64_emit_ops): Add the new functions.
961 (i386_emit_eq_goto): New function.
962 (i386_emit_ne_goto): New function.
963 (i386_emit_lt_goto): New function.
964 (i386_emit_le_goto): New function.
965 (i386_emit_gt_goto): New function.
966 (i386_emit_ge_goto): New function.
967 (i386_emit_ops): Add the new functions.
968
969 2011-09-08 Stan Shebs <stan@codesourcery.com>
970
971 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
972 (i386_emit_epilogue): Restore %ebx.
973
974 2011-08-31 Jie Zhang <jzhang918@gmail.com>
975
976 * server.c (step_thread): Remove definition.
977 (process_serial_event): Don't handle Hs.
978 * server.h (step_thread): Remove declaration.
979 * target.c (set_desired_inferior): Remove use of step_thread.
980
981 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
982
983 * linux-low.c: Include linux-procfs.h.
984 (linux_attach_lwp_1): Update comments.
985 (linux_attach): Scan for existing threads when attaching to a
986 process that is the tgid.
987 * Makefile.in: Update dependencies.
988
989 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
990
991 * configure.srv: Add linux-procfs.o dependencies.
992
993 2011-08-14 Yao Qi <yao@codesourcery.com>
994
995 * target.h (struct target_ops): Fix indent.
996 * win32-low.c (win32_target_ops): Fix comment.
997
998 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
999 Yao Qi <yao@codesourcery.com>
1000
1001 * Makefile.in (clean): Remove tic6x-*.c files.
1002 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1003 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1004 (tic6x-c64xp-linux.c): Likewise.
1005 * configure.srv: Add support for tic6x-*-uclinux.
1006 * linux-tic6x-low.c: New.
1007 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1008
1009 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
1010 Yao Qi <yao@codesourcery.com>
1011
1012 * target.h (struct target_ops): Add read_loadmap.
1013 * linux-low.c (struct target_loadseg): New type.
1014 (struct target_loadmap): New type.
1015 (linux_read_loadmap): New function.
1016 (linux_target_ops): Add linux_read_loadmap.
1017 * server.c (handle_query): Support qXfer:fdpic:read packet.
1018 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1019
1020 2011-08-05 Eli Zaretskii <eliz@gnu.org>
1021
1022 * win32-low.c: Include <stdint.h>.
1023
1024 2011-07-22 Pedro Alves <pedro@codesourcery.com>
1025
1026 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1027 to the inferior here.
1028 (i386_remove_aligned_watchpoint): Ditto.
1029 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1030 fit part of the watchpoint in the debug registers.
1031 (i386_update_inferior_debug_regs): New.
1032 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1033 registers, and only update the inferior on success.
1034 (i386_low_remove_watchpoint): Ditto.
1035
1036 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1037
1038 * linux-low.c (compare_ints, unique, list_threads, show_process,
1039 linux_core_of_thread): Delete.
1040 (linux_target_ops): Change linux_core_of_thread to
1041 linux_common_core_of_thread.
1042 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1043 * utils.c (malloc_failure): Change type of argument.
1044 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1045 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1046 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1047 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1048 (IPA_OBJS): Add common-utils-ipa.o.
1049 (ptid_h, linux_osdata_h): New macros.
1050 (server_h): Add common/common-utils.h, common/xml-utils.h,
1051 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1052 common/ptid.h.
1053 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1054 ptid.o, buffer.o): New rules.
1055 (linux-low.o): Add common/linux-osdata.h as a dependency.
1056 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1057 * configure.ac: Add AC_HEADER_DIRENT check.
1058 * config.in: Regenerate.
1059 * configure: Regenerate.
1060 * remote-utils.c (xml_escape_text): Delete.
1061 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1062 buffer_xml_printf): Move to common/buffer.c.
1063 * server.c (main): Remove call to initialize_inferiors.
1064 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1065 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1066 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1067 internal_error, gdb_assert, gdb_assert_fail): Delete.
1068 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1069 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1070 common/buffer.h.
1071 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1072 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1073 initialize_inferiors): Delete.
1074
1075 2011-07-20 Pedro Alves <pedro@codesourcery.com>
1076
1077 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1078 symbol error.
1079
1080 2011-05-31 Pedro Alves <pedro@codesourcery.com>
1081
1082 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1083 assertion.
1084 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1085
1086 2011-05-26 Yao Qi <yao@codesourcery.com>
1087
1088 * Makefile.in (thread-db.o): Track dependence to
1089 common/gdb_thread_db.h.
1090 * thread-db.c: include gdb_thread_db.h from right place.
1091
1092 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1093
1094 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1095 __FILE__ and __LINE__ to internal_error.
1096
1097 2011-05-13 Doug Evans <dje@google.com>
1098
1099 * thread-db.c (try_thread_db_load_from_sdir): New function.
1100 (try_thread_db_load_from_dir): New function.
1101 (thread_db_load_search): Handle $sdir, ignore $pdir.
1102 Remove trying of system directories if search of
1103 libthread-db-search-path fails, that is now done via $sdir.
1104
1105 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1106
1107 * server.c (handle_query): Add EnableDisableTracepoints to the list
1108 of supported features.
1109 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1110 tracepoints.
1111 (cmd_qtenable_disable): New.
1112 (cmd_qtstart): Install tracepoints even if disabled.
1113 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1114 receiving a QTEnable or QTDisable packet.
1115 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1116 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1117 tracepoints.
1118 (gdb_probe): Skip data collection if static tracepoint is disabled.
1119
1120 2011-05-10 Doug Evans <dje@google.com>
1121
1122 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1123
1124 2011-05-04 Doug Evans <dje@google.com>
1125
1126 * linux-low.c (linux_join): Skip process lookup.
1127 * spu-low.c (spu_join): Ditto.
1128 * server.c (join_inferiors_callback): Delete.
1129 (process_serial_event): For 'D' packet (detach) call join_inferior
1130 directly.
1131
1132 2011-05-04 Joseph Myers <joseph@codesourcery.com>
1133
1134 * README: Don't mention xscale*-*-linux*.
1135 * configure.srv (xscale*-*-linux*): Don't handle target.
1136
1137 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1138
1139 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1140 casting pointers.
1141 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1142 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1143 (i386_emit_void_call_2): Likewise.
1144
1145 2011-04-26 Yao Qi <yao@codesourcery.com>
1146
1147 * linux-low.c: Move common macros to linux-ptrace.h.
1148 Include linux-ptrace.h.
1149 * Makefile.in (linux_ptrace_h): New.
1150 (linux-low.o): Depends on linux-ptrace.h.
1151
1152 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1153
1154 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1155 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1156 (remote_prepare): New function with most of the TCP code from ...
1157 (remote_open): ... here. Detect PORT here unconditionally. Move also
1158 setting transport_is_reliable.
1159 * server.c (run_once): New variable.
1160 (gdbserver_usage): Document it.
1161 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1162 the first run if RUN_ONCE.
1163 * server.h (run_once, remote_prepare): New declarations.
1164
1165 2011-04-19 Tom Tromey <tromey@redhat.com>
1166
1167 * win32-low.c (handle_load_dll): Remove duplicate "the".
1168
1169 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1170
1171 Remove support for old Cygwin 1.5 versions.
1172 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1173 function to avoid warning.
1174 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1175 warning.
1176
1177 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1178
1179 * gdbserver/server.h (Macro _): Define it if not available.
1180
1181 2011-03-14 Michael Snyder <msnyder@vmware.com>
1182
1183 * hostio.c (handle_close): Remove unnecessary null test.
1184
1185 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1186
1187 * Makefile.in (maintainer-clean realclean distclean): Remove
1188 "make ... subdir_do" command.
1189
1190 2011-03-10 Michael Snyder <msnyder@vmware.com>
1191
1192 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1193
1194 * server.c (handle_v_run): Free alloced buffer on early return.
1195
1196 2011-03-09 Yao Qi <yao@codesourcery.com>
1197
1198 Revert:
1199 2011-03-04 Yao Qi <yao@codesourcery.com>
1200
1201 * Makefile.in: Remove GNU make feature --directory.
1202
1203 2011-03-05 Yao Qi <yao@codesourcery.com>
1204
1205 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1206 (subdir_do): New make target. Copied from gdb/Makefile.
1207 (maintainer-clean, realclean, distclean, clean): Call corresponding
1208 make targets in common/Makefile.
1209
1210 2011-02-11 Yao Qi <yao@codesourcery.com>
1211
1212 * configure.ac: Call AC_PROG_RANLIB.
1213 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1214 * configure: Regenerate.
1215
1216 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1217
1218 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1219
1220 2011-03-06 Yao Qi <yao@codesourcery.com>
1221
1222 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1223
1224 2011-03-05 Yao Qi <yao@codesourcery.com>
1225
1226 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1227 (subdir_do): New make target. Copied from gdb/Makefile.
1228 (maintainer-clean, realclean, distclean, clean): Call corresponding
1229 make targets in common/Makefile.
1230
1231 2011-03-04 Yao Qi <yao@codesourcery.com>
1232
1233 * Makefile.in: Remove GNU make feature --directory.
1234
1235 2011-03-04 Michael Snyder <msnyder@vmware.com>
1236
1237 * server.c (queue_stop_reply): Call xmalloc not malloc.
1238
1239 2011-03-02 Michael Snyder <msnyder@vmware.com>
1240
1241 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1242
1243 2011-02-28 Michael Snyder <msnyder@vmware.com>
1244
1245 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1246 (cmd_qtframe): Ditto.
1247 (cmd_qtbuffer): Ditto.
1248 (cmd_bigqtbuffer): Ditto.
1249
1250 * utils.c (decimal2str): Initialize 'width' to nine, then
1251 don't mess with it.
1252
1253 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1254
1255 * hostio.c (require_data): Free *data, not data.
1256
1257 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1258
1259 * hostio.c (require_data): Use free, not xfree.
1260
1261 2011-02-27 Michael Snyder <msnyder@vmware.com>
1262
1263 * server.c (handle_query): Discard unused value.
1264
1265 * hostio.c (require_data): Free malloc memory before returning
1266 error.
1267
1268 2011-02-26 Michael Snyder <msnyder@vmware.com>
1269
1270 * linux-low.c (list_threads): Call closedir for dirent.
1271
1272 2011-02-27 Michael Snyder <msnyder@vmware.com>
1273
1274 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1275 a case statement falls through.
1276
1277 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1278
1279 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1280 in comparison.
1281
1282 2011-02-26 Michael Snyder <msnyder@vmware.com>
1283
1284 * utils.c (decimal2str): Eliminate dead code and dead param.
1285 (pulongest): Drop dead param from call to decimal2str.
1286 (plongest): Ditto.
1287
1288 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1289
1290 Revert the following patch (not approved yet):
1291 2011-02-21 Hui Zhu <teawater@gmail.com>
1292 * tracepoint.c (tp_printf): New function.
1293 (eval_agent_expr): Handle gdb_agent_op_printf.
1294
1295 2011-02-21 Hui Zhu <teawater@gmail.com>
1296
1297 * tracepoint.c (tp_printf): New function.
1298 (eval_agent_expr): Handle gdb_agent_op_printf.
1299
1300 2011-02-18 Tom Tromey <tromey@redhat.com>
1301
1302 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1303 (tracepoint.o): Likewise.
1304 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1305 (gdb_agent_op_names): Likewise.
1306
1307 2011-02-18 Tom Tromey <tromey@redhat.com>
1308
1309 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1310 gdb_agent_op_rot>: New constants.
1311 (gdb_agent_op_names): Add pick and roll.
1312 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1313 cases.
1314
1315 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1316
1317 * aclocal.m4: Regenerated with aclocal-1.11.1.
1318
1319 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1320
1321 * server.c (handle_qxfer_traceframe_info): New.
1322 (qxfer_packets): Register "traceframe-info".
1323 (handle_query): Report support for qXfer:traceframe-info:read+.
1324 * tracepoint.c (match_blocktype): New.
1325 (traceframe_find_block_type): Rename to ...
1326 (traceframe_walk_blocks): ... this. Add callback filter argument,
1327 and use it.
1328 (traceframe_find_block_type): New, reimplemented on top of
1329 traceframe_walk_blocks.
1330 (build_traceframe_info_xml): New.
1331 (traceframe_read_info): New.
1332 * server.h (traceframe_read_info): Declare.
1333
1334 2011-02-11 Yao Qi <yao@codesourcery.com>
1335
1336 * configure.ac: Call AC_PROG_RANLIB.
1337 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1338 * configure: Regenerate.
1339
1340 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1341
1342 * server.c (gdb_read_memory): Change return semantics to allow
1343 partial transfers.
1344 (handle_search_memory_1): Adjust.
1345 (process_serial_event) <'m' packet>: Handle partial transfers.
1346 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1347
1348 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1349
1350 * regcache.c (init_register_cache): Initialize
1351 regcache->register_status.
1352 (free_register_cache): Release regcache->register_status.
1353 (regcache_cpy): Copy register_status.
1354 (registers_to_string): Print 'x's for unavailable registers.
1355 (supply_register): Mark the register's status valid or
1356 unavailable, depending on whether a buffer was passed in or not.
1357 (supply_register_zeroed): New.
1358 (supply_regblock): Mark the registers' status valid or
1359 unavailable, depending on whether a buffer was passed in or not.
1360 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1361 (struct regcache): New `register_status' field.
1362 (supply_register_zeroed): Declare.
1363 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1364 supply_register_zeroed, rather than passing a NULL buffer to
1365 supply_register.
1366 * tracepoint.c (fetch_traceframe_registers): Update comment.
1367
1368 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1369
1370 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1371 buffer explicit.
1372
1373 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1374
1375 * server.h (decode_xfer_write): Change prototype.
1376 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1377 and don't extract the annex here.
1378 * server.c (decode_xfer_read): Remove `annex' parameter,
1379 and don't extract the annex here.
1380 (decode_xfer): New.
1381 (struct qxfer): New.
1382 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1383 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1384 (handle_qxfer_statictrace): New functions, abstracted out from
1385 handle_query, and made to use the struct qxfer interface.
1386 (handle_threads_qxfer_proper): Rename to ...
1387 (handle_qxfer_threads_proper): ... this.
1388 (handle_threads_qxfer): Rename to ...
1389 (handle_qxfer_threads): ... this. Adjust.
1390 (qxfer_packets): New array.
1391 (handle_qxfer): New function.
1392 (handle_query): Use handle_qxfer.
1393
1394 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1395
1396 * gdbreplay.c: Shorten lines of >= 80 columns.
1397 * linux-low.c: Ditto.
1398 * linux-ppc-low.c: Ditto.
1399 * linux-s390-low.c: Ditto.
1400 * linux-sparc-low.c: Ditto.
1401 * linux-x86-low.c: Ditto.
1402 * linux-xtensa-low.c: Ditto.
1403 * mem-break.c: Ditto.
1404 * nto-low.c: Ditto.
1405 * regcache.h: Ditto.
1406 * remote-utils.c: Ditto.
1407 * server.c: Ditto.
1408 * server.h: Ditto.
1409 * thread-db.c: Ditto.
1410 * tracepoint.c: Ditto.
1411 * utils.c: Ditto.
1412 * win32-low.h: Ditto.
1413
1414 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1415
1416 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1417 update.
1418
1419 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1420
1421 * server.c (gdbserver_version): Update copyright year in version
1422 output.
1423 * gdbreplay.c (gdbreplay_version): Ditto.
1424
1425 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1426
1427 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1428 * linux-bfin-low.c: New file.
1429 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1430 PT_DATA_ADDR for BFIN targets.
1431 * Makefile.in (SFILES): Add linux-bfin-low.c.
1432 (clean): Remove reg-bfin.c.
1433 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1434 * README: Mention supported Blackfin targets.
1435
1436 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1437
1438 * .gitignore: New file.
1439
1440 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1441
1442 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1443
1444 2010-10-22 Jie Zhang <jie@codesourcery.com>
1445
1446 * Makefile.in: Add FLAGS_TO_PASS variable.
1447 (install): Remove dependency of install-only and recursively
1448 invoke make for install-only.
1449
1450 2010-10-04 Doug Evans <dje@google.com>
1451
1452 * Makefile.in (uninstall): Use $(DESTDIR).
1453
1454 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1455
1456 PR gdb/11842
1457
1458 * linux-x86-low.c (compat_siginfo_from_siginfo)
1459 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1460 si_code is < 0. Check for si_code == SI_TIMER before checking for
1461 si_code < 0.
1462
1463 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1464
1465 * lynx-i386-low.c: New file.
1466 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1467
1468 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1469
1470 * lynx-low.c (ptrace_request_to_str): Remove handling for
1471 request values that have been removed in LynxOS 5.x.
1472
1473 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1474
1475 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1476 <ptrace.h>
1477
1478 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1479
1480 * configure.ac: Add --enable-inprocess-agent option.
1481 * configure: Rebuilt.
1482
1483 2010-09-06 Yao Qi <yao@codesourcery.com>
1484
1485 * linux-low.c (linux_kill): Remove unused variable.
1486 (linux_stabilize_threads): Likewise.
1487 * server.c (start_inferior): Likewise.
1488 (queue_stop_reply_callback): Likewise.
1489 * tracepoint.c (do_action_at_tracepoint): Likewise.
1490
1491 2010-09-06 Yao Qi <yao@codesourcery.com>
1492
1493 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1494 on return.
1495
1496 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1497
1498 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1499
1500 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1501
1502 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1503 "$(IPA_DEPFILES)".
1504
1505 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1506
1507 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1508 gdbserver/lynx-ppc-low.c: New files.
1509 * Makefile.in (lynx_low_h): New variable.
1510 (lynx-low.o, lynx-ppc-low.o): New rules.
1511 * configure.ac: On LynxOS, link with -lnetinet.
1512 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1513 * configure: regenerate.
1514
1515 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1516
1517 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1518 * configure.ac: Add check for vasprintf and vsnprintf.
1519 * configure, config.in: Regenerate.
1520 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1521
1522 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1523
1524 * gdbreplay.c: Move include of alloca.h up, next to include of
1525 malloc.h.
1526 * server.h: Add include of malloc.h.
1527 * mem-break.c: Remove include of malloc.h.
1528 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1529
1530 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1531
1532 * Makefile.in (memmem.o): Build with -Wno-error.
1533
1534 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1535
1536 * utils.c (xsnprintf): Make non-static.
1537 * server.h: Add xsnprintf declaration.
1538 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1539 replace calls to snprintf by calls to xsnprintf throughout.
1540
1541 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1542
1543 * configure.ac: Add configure check for alloca.
1544 * configure, config.in: Regenerate.
1545 * server.h: Include alloca.h if it exists.
1546 * gdbreplay.c: Include alloca.h if it exists.
1547
1548 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1549
1550 * linux-low.c (__SIGRTMIN): Define if not already defined.
1551 (linux_create_inferior): Check for __ANDROID__ rather than
1552 __SIGRTMIN.
1553 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1554 are already deferred.
1555 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1556 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1557 stopped and already has a pending signal to report.
1558 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1559 a pending signal to report or is moving out of a jump pad.
1560 (linux_init_signals): Check for __ANDROID__ rather than
1561 __SIGRTMIN.
1562
1563 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1564
1565 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1566 debug_threads check. Avoid a linear search when not doing debug
1567 output.
1568
1569 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1570
1571 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1572 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1573 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1574 (process_event): Change local fd's type to gdb_fildes_t.
1575 (create_file_handler): Adjust prototype.
1576 (delete_file_handler): Adjust prototype.
1577 (handle_file_event): Adjust prototype. Use pfildes.
1578 (create_file_event): Adjsut prototype.
1579 * remote-utils.c (remote_desc, listen_desc): Change type to
1580 gdb_fildes_t.
1581 * server.h: New gdb_fildes_t typedef.
1582 [USE_WIN32API]: Include winsock2.h.
1583 (delete_file_handler, add_file_handler): Adjust prototypes.
1584 (pfildes): Declare.
1585 * utils.c (pfildes): New.
1586
1587 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1588
1589 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1590 * configure: Regenerate.
1591
1592 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1593
1594 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1595 (linux_done_accessing_memory): ... this.
1596 (linux_target_ops): Adjust.
1597 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1598 * nto-low.c (nto_target_ops): Adjust comment.
1599 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1600 * spu-low.c (spu_target_ops): Adjust comment.
1601 * target.h (target_ops): Rename unprepare_to_access_memory field
1602 to done_accessing_memory.
1603 (unprepare_to_access_memory): Rename to ...
1604 (done_accessing_memory): ... this.
1605
1606 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1607
1608 * linux-low.c (linux_prepare_to_access_memory): New.
1609 (linux_unprepare_to_access_memory): New.
1610 (linux_target_ops): Install them.
1611 * server.c (read_memory): Rename to ...
1612 (gdb_read_memory): ... this. Use
1613 prepare_to_access_memory/prepare_to_access_memory.
1614 (write_memory): Rename to ...
1615 (gdb_write_memory): ... this. Use
1616 prepare_to_access_memory/prepare_to_access_memory.
1617 (handle_search_memory_1): Adjust.
1618 (process_serial_event): Adjust.
1619 * target.h (struct target_ops): New fields
1620 prepare_to_access_memory and unprepare_to_access_memory.
1621 (prepare_to_access_memory, unprepare_to_access_memory): New.
1622 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1623 prepare_to_access_memory/prepare_to_access_memory.
1624 * nto-low.c (nto_target_ops): Adjust.
1625 * spu-low.c (spu_target_ops): Adjust.
1626 * win32-low.c (win32_target_ops): Adjust.
1627
1628 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1629
1630 * Makefile.in (WARN_CFLAGS): Get it from configure.
1631 (WERROR_CFLAGS): New.
1632 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1633 * configure.ac: Introduce --enable-werror, which adds -Werror to
1634 the compiler command line. Enabled by default. Disable with
1635 --disable-werror. Add -Wdeclaration-after-statement
1636 Wpointer-arith and -Wformat-nonliteral to warning flags.
1637 * configure: Regenerate.
1638
1639 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1640
1641 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1642
1643 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1644
1645 * gdbreplay.c (remote_error): New.
1646 (gdbchar): New.
1647 (expect): Use gdbchar. Check for error reading from GDB.
1648 Clarify sync error output.
1649 (play): Check for errors writing to GDB.
1650 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1651 * remote-utils.c (getpkt): Check for errors writing to the remote
1652 descriptor.
1653
1654 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1655
1656 * linux-low.c (linux_wait_1): Move non-debugging code out of
1657 `debug_threads' control.
1658
1659 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1660
1661 * linux-low.c (linux_wait_1): Don't set last_status here.
1662 * server.c (push_event, queue_stop_reply_callback): Assert we're
1663 not pushing a TARGET_WAITKIND_IGNORE event.
1664 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1665 (myresume, handle_target_event): Set the thread's last_resume_kind
1666 and last_status from the target returned status.
1667
1668 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1669
1670 PR threads/10729
1671
1672 * linux-x86-low.c (update_debug_registers_callback): New.
1673 (i386_dr_low_set_addr): Use it.
1674 (i386_dr_low_get_addr): New.
1675 (i386_dr_low_set_control): Use update_debug_registers_callback.
1676 (i386_dr_low_get_control): New.
1677 (i386_dr_low_get_status): Adjust.
1678 * linux-low.c (linux_stop_lwp): New.
1679 * linux-low.h (linux_stop_lwp): Declare.
1680
1681 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1682 argument instead of a i386_debug_reg_state.
1683 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1684 a i386_debug_reg_state.
1685 (i386_insert_aligned_watchpoint): Adjust.
1686 (i386_remove_aligned_watchpoint): Adjust.
1687 (i386_low_stopped_data_address): Read the debug registers from the
1688 inferior instead of from the mirrors.
1689 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1690 (i386_dr_low_get_addr): Declare.
1691 (i386_dr_low_get_control): Declare.
1692 (i386_dr_low_get_status): Change prototype.
1693
1694 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1695 (i386_dr_low_get_addr): New.
1696 (i386_dr_low_get_control): New.
1697 (i386_dr_low_get_status): Adjust prototype. Return
1698 dr_status_mirror.
1699 (i386_initial_stuff): Clear dr_status_mirror and
1700 dr_control_mirror.
1701 (i386_get_thread_context): Adjust.
1702 (i386_set_thread_context): Adjust.
1703 (i386_thread_added): Adjust.
1704
1705 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1706
1707 * linux-low.h (linux_thread_area): Delete declaration.
1708
1709 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1710
1711 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1712 after its termination.
1713
1714 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1715
1716 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1717 (gdb_wants_all_stopped): Delete.
1718 (linux_wait_1): Don't call them.
1719 * server.c (handle_v_cont): Tag all threads as want-stopped.
1720 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1721 stopped as "client-wants-stopped".
1722
1723 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1724
1725 * Makefile.in (signals_h): New.
1726 (server_h): Depend on it.
1727 (server.o): Don't depend on $(signals_def).
1728 (signals.o): Depend on $(signals_def).
1729
1730 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1731
1732 * Makefile.in (signals_def): New.
1733 (server_h): Append include/gdb/signals.h and signals_def.
1734 (server.o): Append signals_def.
1735
1736 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1737
1738 * server.c (handle_target_event): Use target_signal_to_host for
1739 resume_info.sig initialization.
1740 * target.h (struct thread_resume) <sig>: New comment.
1741
1742 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1743
1744 * server.c (handle_query): strcpy() the returned string from paddress()
1745 instead of sprintf().
1746 * utils.c (paddress): Return phex_nz().
1747
1748 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1749
1750 * server.c (handle_v_cont): Call mourn_inferior if process
1751 just exited.
1752 (myresume): Likewise.
1753
1754 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1755
1756 Static tracepoints, and integration with UST.
1757
1758 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1759 * mem-break.c (uninsert_all_breakpoints)
1760 (reinsert_all_breakpoints): New.
1761 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1762 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1763 (gdb_agent_ust_loaded, helper_thread_id)
1764 (gdb_agent_helper_thread_id): New macros.
1765 (struct ipa_sym_addresses): Add addr_ust_loaded,
1766 addr_helper_thread_id, addr_cmd_buf.
1767 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1768 (in_process_agent_loaded_ust): New.
1769 (write_e_ust_not_loaded): New.
1770 (maybe_write_ipa_ust_not_loaded): New.
1771 (struct collect_static_trace_data_action): New.
1772 (enum tracepoint_type) <static_tracepoint>: New.
1773 (struct tracepoint) <handle>: Mention static tracepoints.
1774 (struct static_tracepoint_ctx): New.
1775 (CMD_BUF_SIZE): New.
1776 (add_tracepoint_action): Handle static tracepoint actions.
1777 (unprobe_marker_at): New.
1778 (clear_installed_tracepoints): Handle static tracepoints.
1779 (cmd_qtdp): Handle static tracepoints.
1780 (probe_marker_at): New.
1781 (cmd_qtstart): Handle static tracepoints.
1782 (response_tracepoint): Handle static tracepoints.
1783 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1784 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1785 (get_context_regcache): Handle static tracepoints.
1786 (do_action_at_tracepoint): Handle static tracepoint actions.
1787 (traceframe_find_block_type): Handle static trace data blocks.
1788 (traceframe_read_sdata): New.
1789 (download_tracepoints): Download static tracepoint actions.
1790 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1791 (GDB_PROBE_NAME): New.
1792 (ust_ops): New.
1793 (GET_UST_SYM): New.
1794 (USTF): New.
1795 (dlsym_ust): New.
1796 (ust_marker_to_static_tracepoint): New.
1797 (gdb_probe): New.
1798 (collect_ust_data_at_tracepoint): New.
1799 (gdb_ust_probe): New.
1800 (UNIX_PATH_MAX, SOCK_DIR): New.
1801 (gdb_ust_connect_sync_socket): New.
1802 (resume_thread, stop_thread): New.
1803 (run_inferior_command): New.
1804 (init_named_socket): New.
1805 (gdb_ust_socket_init): New.
1806 (cstr_to_hexstr): New.
1807 (next_st): New.
1808 (first_marker, next_marker): New.
1809 (response_ust_marker): New.
1810 (cmd_qtfstm, cmd_qtsstm): New.
1811 (unprobe_marker_at, probe_marker_at): New.
1812 (cmd_qtstmat, gdb_ust_thread): New.
1813 (gdb_ust_init): New.
1814 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1815 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1816 (ST_REGENTRY): New.
1817 (x86_64_st_collect_regmap): New.
1818 (X86_64_NUM_ST_COLLECT_GREGS): New.
1819 (AMD64_RIP_REGNUM): New.
1820 (supply_static_tracepoint_registers): New.
1821 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1822 (ST_REGENTRY): New.
1823 (i386_st_collect_regmap): New.
1824 (i386_NUM_ST_COLLECT_GREGS): New.
1825 (supply_static_tracepoint_registers): New.
1826 * server.c (handle_query): Handle qXfer:statictrace:read.
1827 <qSupported>: Report support for StaticTracepoints, and
1828 qXfer:statictrace:read features.
1829 * server.h (traceframe_read_sdata)
1830 (supply_static_tracepoint_registers): Declare.
1831 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1832 (unpack_varlen_hex): Include in IPA build.
1833 * Makefile.in (ustlibs, ustinc): New.
1834 (IPA_OBJS): Add remote-utils-ipa.o.
1835 ($(IPA_LIB)): Link -ldl and -lpthread.
1836 (UST_CFLAGS): New.
1837 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1838 * config.in, configure: Regenerate.
1839
1840 2010-06-20 Ian Lance Taylor <iant@google.com>
1841 Pedro Alves <pedro@codesourcery.com>
1842
1843 * linux-x86-low.c (always_true): Delete.
1844 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1845 trying to fool the compiler with always_true.
1846
1847 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1848
1849 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1850 conditions in gdbserver.
1851
1852 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1853
1854 * spu-low.c (spu_read_memory): Wrap around local store limit.
1855 (spu_write_memory): Likewise.
1856
1857 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1858
1859 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1860 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1861 LONGEST uses.
1862 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1863 uses.
1864 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1865 uses with LONGEST uses.
1866
1867 2010-06-14 Stan Shebs <stan@codesourcery.com>
1868 Pedro Alves <pedro@codesourcery.com>
1869
1870 Bytecode compiler.
1871
1872 * linux-x86-low.c: Include limits.h.
1873 (add_insns): New.
1874 (always_true): New.
1875 (EMIT_ASM): New.
1876 (EMIT_ASM32): New.
1877 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1878 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1879 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1880 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1881 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1882 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1883 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1884 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1885 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1886 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1887 (amd64_emit_void_call_2): New.
1888 (amd64_emit_ops): New.
1889 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1890 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1891 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1892 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1893 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1894 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1895 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1896 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1897 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1898 (i386_emit_stack_adjust, i386_emit_int_call_1)
1899 (i386_emit_void_call_2): New.
1900 (i386_emit_ops): New.
1901 (x86_emit_ops): New.
1902 (the_low_target): Install x86_emit_ops.
1903 * server.h (struct emit_ops): New.
1904 (get_raw_reg_func_addr): Declare.
1905 (current_insn_ptr, emit_error): Declare.
1906 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1907 (set_trace_state_variable_value): New defines.
1908 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1909 addr_get_trace_state_variable_value and
1910 addr_set_trace_state_variable_value.
1911 (symbol_list): New fields for get_raw_reg,
1912 get_trace_state_variable_value and set_trace_state_variable_value.
1913 (condfn): New typedef.
1914 (struct tracepoint): New field `compiled_cond'.
1915 (do_action_at_tracepoint): Clear compiled_cond.
1916 (get_trace_state_variable_value, set_trace_state_variable_value):
1917 Export in the IPA.
1918 (condition_true_at_tracepoint): If there's a compiled condition,
1919 run that.
1920 (current_insn_ptr, emit_error): New globals.
1921 (struct bytecode_address): New.
1922 (get_raw_reg_func_addr): New.
1923 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1924 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1925 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1926 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1927 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1928 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1929 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1930 (compile_tracepoint_condition, compile_bytecodes): New.
1931 * target.h (emit_ops): Forward declare.
1932 (struct target_ops): New field emit_ops.
1933 (target_emit_ops): New.
1934 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1935 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1936 * linux-low.c (linux_emit_ops): New.
1937 (linux_target_ops): Install it.
1938 * linux-low.h (struct linux_target_ops): New field emit_ops.
1939
1940 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1941
1942 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1943 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1944
1945 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1946 Stan Shebs <stan@codesourcery.com>
1947
1948 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1949 (all): Depend on $(extra_libraries).
1950 (install-only): Install the IPA.
1951 (IPA_OBJS, IPA_LIB): New.
1952 (clean): Remove the IPA lib.
1953 (IPAGENT_CFLAGS): New.
1954 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1955 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1956 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1957 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1958 * configure.ac: Check for atomic builtins support in the compiler.
1959 (IPA_DEPFILES, extra_libraries): Define.
1960 * configure.srv (ipa_obj): Add description.
1961 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1962 (i[34567]86-*-linux*): Set ipa_obj.
1963 (x86_64-*-linux*): Set ipa_obj.
1964 * linux-low.c (stabilizing_threads): New.
1965 (supports_fast_tracepoints): New.
1966 (linux_detach): Stabilize threads before detaching.
1967 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1968 the lwp is either not stabilizing, or is moving out of a jump pad.
1969 (linux_fast_tracepoint_collecting): New.
1970 (maybe_move_out_of_jump_pad): New.
1971 (enqueue_one_deferred_signal): New.
1972 (dequeue_one_deferred_signal): New.
1973 (linux_wait_for_event_1): If moving out of a jump pad, defer
1974 pending signals to later.
1975 (linux_stabilize_threads): New.
1976 (linux_wait_1): Check if threads need moving out of jump pads, and
1977 do it if so.
1978 (stuck_in_jump_pad_callback): New.
1979 (move_out_of_jump_pad_callback): New.
1980 (lwp_running): New.
1981 (linux_resume_one_lwp): Handle moving out of jump pads.
1982 (linux_set_resume_request): Dequeue deferred signals.
1983 (need_step_over_p): Also step over fast tracepoint jumps.
1984 (start_step_over): Also uninsert fast tracepoint jumps.
1985 (finish_step_over): Also reinsert fast tracepoint jumps.
1986 (linux_install_fast_tracepoint_jump): New.
1987 (linux_target_ops): Install linux_stabilize_threads and
1988 linux_install_fast_tracepoint_jump_pad.
1989 * linux-low.h (linux_target_ops) <get_thread_area,
1990 install_fast_tracepoint_jump_pad>: New fields.
1991 (struct lwp_info) <collecting_fast_tracepoint,
1992 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1993 (linux_get_thread_area): Declare.
1994 * linux-x86-low.c (jump_insn): New.
1995 (x86_get_thread_area): New.
1996 (append_insns): New.
1997 (push_opcode): New.
1998 (amd64_install_fast_tracepoint_jump_pad): New.
1999 (i386_install_fast_tracepoint_jump_pad): New.
2000 (x86_install_fast_tracepoint_jump_pad): New.
2001 (the_low_target): Install x86_get_thread_area and
2002 x86_install_fast_tracepoint_jump_pad.
2003 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2004 (struct fast_tracepoint_jump): New.
2005 (fast_tracepoint_jump_insn): New.
2006 (fast_tracepoint_jump_shadow): New.
2007 (find_fast_tracepoint_jump_at): New.
2008 (fast_tracepoint_jump_here): New.
2009 (delete_fast_tracepoint_jump): New.
2010 (set_fast_tracepoint_jump): New.
2011 (uninsert_fast_tracepoint_jumps_at): New.
2012 (reinsert_fast_tracepoint_jumps_at): New.
2013 (set_breakpoint_at): Use write_inferior_memory.
2014 (uninsert_raw_breakpoint): Use write_inferior_memory.
2015 (check_mem_read): Mask out fast tracepoint jumps.
2016 (check_mem_write): Mask out fast tracepoint jumps.
2017 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2018 (set_fast_tracepoint_jump): Declare.
2019 (delete_fast_tracepoint_jump)
2020 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2021 (reinsert_fast_tracepoint_jumps_at): Declare.
2022 * regcache.c: Don't compile many functions when building the
2023 in-process agent library.
2024 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2025 the register buffer in the heap.
2026 (free_register_cache): If the register buffer isn't owned by the
2027 regcache, don't free it.
2028 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2029 pre-existing register caches.
2030 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2031 type.
2032 (convert_ascii_to_int): : Constify `from' parameter type.
2033 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2034 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2035 the needed buffer in-place.
2036 (relocate_instruction): New.
2037 * server.c (handle_query) <qSymbols>: If the target supports
2038 tracepoints, give it a chance of looking up symbols. Report
2039 support for fast tracepoints.
2040 (handle_status): Stabilize threads.
2041 (process_serial_event): Adjust.
2042 * server.h (struct fast_tracepoint_jump): Forward declare.
2043 (struct process_info) <fast_tracepoint_jumps>: New field.
2044 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2045 (decode_X_packet, decode_M_packet): Adjust.
2046 (relocate_instruction): Declare.
2047 (in_process_agent_loaded): Declare.
2048 (tracepoint_look_up_symbols): Declare.
2049 (struct fast_tpoint_collect_status): Declare.
2050 (fast_tracepoint_collecting): Declare.
2051 (force_unlock_trace_buffer): Declare.
2052 (handle_tracepoint_bkpts): Declare.
2053 (initialize_low_tracepoint)
2054 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2055 * target.h (struct target_ops) <stabilize_threads,
2056 install_fast_tracepoint_jump_pad>: New fields.
2057 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2058 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2059 [HAVE_STDINT_H]: Include stdint.h.
2060 (trace_debug_1): Rename to ...
2061 (trace_vdebug): ... this.
2062 (trace_debug): Rename to ...
2063 (trace_debug_1): ... this. Add `level' parameter.
2064 (trace_debug): New.
2065 (ATTR_USED, ATTR_NOINLINE): New.
2066 (IP_AGENT_EXPORT): New.
2067 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2068 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2069 (about_to_request_buffer_space, trace_buffer_is_full)
2070 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2071 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2072 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2073 (traceframe_write_count, traceframes_created)
2074 (trace_state_variables)
2075 New renaming defines.
2076 (struct ipa_sym_addresses): New.
2077 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2078 (symbol_list): New.
2079 (ipa_sym_addrs): New.
2080 (all_tracepoint_symbols_looked_up): New.
2081 (in_process_agent_loaded): New.
2082 (write_e_ipa_not_loaded): New.
2083 (maybe_write_ipa_not_loaded): New.
2084 (tracepoint_look_up_symbols): New.
2085 (debug_threads) [IN_PROCESS_AGENT]: New.
2086 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2087 (UNKNOWN_SIDE_EFFECTS): New.
2088 (stop_tracing): New.
2089 (flush_trace_buffer): New.
2090 (stop_tracing_bkpt): New.
2091 (flush_trace_buffer_bkpt): New.
2092 (read_inferior_integer): New.
2093 (read_inferior_uinteger): New.
2094 (read_inferior_data_pointer): New.
2095 (write_inferior_data_pointer): New.
2096 (write_inferior_integer): New.
2097 (write_inferior_uinteger): New.
2098 (struct collect_static_trace_data_action): Delete.
2099 (enum tracepoint_type): New.
2100 (struct tracepoint) <type>: New field `type'.
2101 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2102 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2103 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2104 (tracepoints): Use IP_AGENT_EXPORT.
2105 (last_tracepoint): Don't include in the IPA.
2106 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2107 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2108 (alloced_trace_state_variables): New.
2109 (trace_state_variables): Use IP_AGENT_EXPORT.
2110 (traceframe_t): Delete unused variable.
2111 (circular_trace_buffer): Don't include in the IPA.
2112 (trace_buffer_start): Delete.
2113 (struct trace_buffer_control): New.
2114 (trace_buffer_free): Delete.
2115 (struct ipa_trace_buffer_control): New.
2116 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2117 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2118 New.
2119 (trace_buffer_ctrl): New.
2120 (TRACE_BUFFER_CTRL_CURR): New.
2121 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2122 Reimplement as macros.
2123 (trace_buffer_wrap): Delete.
2124 (traceframe_write_count, traceframe_read_count)
2125 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2126 (struct tracepoint_hit_ctx) <type>: New field.
2127 (struct fast_tracepoint_ctx): New.
2128 (memory_barrier): New.
2129 (cmpxchg): New.
2130 (record_tracepoint_error): Update atomically in the IPA.
2131 (clear_inferior_trace_buffer): New.
2132 (about_to_request_buffer_space): New.
2133 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2134 updating the same buffer.
2135 (add_tracepoint): Default the tracepoint's type to trap
2136 tracepoint, and orig_size to -1.
2137 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2138 internal variables.
2139 (create_trace_state_variable): New parameter `gdb'. Handle it.
2140 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2141 (cmd_qtdp): Handle fast tracepoints.
2142 (cmd_qtdv): Adjust.
2143 (max_jump_pad_size): New.
2144 (gdb_jump_pad_head): New.
2145 (get_jump_space_head): New.
2146 (claim_jump_space): New.
2147 (sort_tracepoints): New.
2148 (MAX_JUMP_SIZE): New.
2149 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2150 IPA.
2151 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2152 support. Upload fast traceframes, and delete internal IPA
2153 breakpoints.
2154 (stop_tracing_handler): New.
2155 (flush_trace_buffer_handler): New.
2156 (cmd_qtstop): Upload fast tracepoints.
2157 (response_tracepoint): Handle fast tracepoints.
2158 (tracepoint_finished_step): Upload fast traceframes. Set the
2159 tracepoint hit context's tracepoint type.
2160 (handle_tracepoint_bkpts): New.
2161 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2162 type. Add comment about fast tracepoints.
2163 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2164 non-existing action_str field.
2165 (get_context_regcache): Handle fast tracepoints.
2166 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2167 to the regcache.
2168 (fast_tracepoint_from_jump_pad_address): New.
2169 (fast_tracepoint_from_ipa_tpoint_address): New.
2170 (collecting_t): New.
2171 (force_unlock_trace_buffer): New.
2172 (fast_tracepoint_collecting): New.
2173 (collecting): New.
2174 (gdb_collect): New.
2175 (write_inferior_data_ptr): New.
2176 (target_tp_heap): New.
2177 (target_malloc): New.
2178 (download_agent_expr): New.
2179 (UALIGN): New.
2180 (download_tracepoints): New.
2181 (download_trace_state_variables): New.
2182 (upload_fast_traceframes): New.
2183 (IPA_FIRST_TRACEFRAME): New.
2184 (IPA_NEXT_TRACEFRAME_1): New.
2185 (IPA_NEXT_TRACEFRAME): New.
2186 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2187 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2188 (gdb_jump_pad_buffer_end): New.
2189 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2190 (initialize_tracepoint): Adjust.
2191 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2192 buffer. Initialize the low module.
2193 * utils.c (PREFIX, TOOLNAME): New.
2194 (malloc_failure): Use PREFIX.
2195 (error): In the IPA, an error causes an exit.
2196 (fatal, warning): Use PREFIX.
2197 (internal_error): Use TOOLNAME.
2198 (NUMCELLS): Increase to 10.
2199 * configure, config.in: Regenerate.
2200
2201 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2202
2203 * server.c (handle_query) <qSupported>: Do two passes over the
2204 qSupported string to avoid nesting strtok.
2205
2206 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2207
2208 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2209 (CDEPS): New.
2210 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2211 -Wl,--dynamic-list.
2212 * configure: Regenerate.
2213 * proc-service.list: New.
2214
2215 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2216
2217 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2218 New comment.
2219
2220 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2221
2222 * gdbreplay.c (remote_open): Check error return from socket() call by
2223 its equality to -1 not by it being negative.
2224 * remote-utils.c (remote_open): Likewise.
2225
2226 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2227
2228 * config.h: Regenerate.
2229
2230 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2231
2232 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2233 doesn't provide PTRACE_GET_THREAD_AREA.
2234
2235 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2236
2237 * linux-m68k-low.c: Include <asm/ptrace.h>
2238 (ps_get_thread_area): Implement.
2239
2240 2010-05-03 Doug Evans <dje@google.com>
2241
2242 * event-loop.c (struct callback_event): New struct.
2243 (callback_list): New global.
2244 (append_callback_event, delete_callback_event): New functions.
2245 (process_callback): New function.
2246 (start_event_loop): Call it.
2247 * remote-utils.c (NOT_SCHEDULED): Define.
2248 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2249 moved out of readchar.
2250 (readchar): Rewrite. Call reschedule before returning.
2251 (reset_readchar): New function.
2252 (remote_close): Call it.
2253 (process_remaining, reschedule): New functions.
2254 * server.h (callback_handler_func): New typedef.
2255 (append_callback_event, delete_callback_event): Declare.
2256
2257 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2258
2259 * proc-service.c (ps_pglobal_lookup): Use
2260 thread_db_look_up_one_symbol.
2261 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2262 parameter. Use it instead of all_symbols_looked_up.
2263 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2264 field.
2265 (all_symbols_looked_up): Don't declare.
2266 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2267 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2268 field.
2269 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2270 Set all_symbols_looked_up here.
2271 (thread_db_look_up_one_symbol): New.
2272 (thread_db_get_tls_address): Adjust.
2273 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2274 thread_db object on the heap, and tentatively set it in the
2275 process structure.
2276 (thread_db_init): Don't set all_symbols_looked_up here.
2277 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2278
2279 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2280
2281 * linux-low.c (linux_kill, linux_detach): Adjust.
2282 (status_pending_p_callback): Remove redundant statement. Check
2283 for !TARGET_WAITIKIND_IGNORE, instead of
2284 TARGET_WAITKIND_STOPPED.
2285 (handle_tracepoints): Make sure LWP is locked. Adjust.
2286 (linux_wait_for_event_1): Adjust.
2287 (linux_cancel_breakpoints): New.
2288 (unsuspend_one_lwp): New.
2289 (unsuspend_all_lwps): New.
2290 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2291 (send_sigstop_callback): Change return type to int, add new
2292 `except' parameter and handle it.
2293 (suspend_and_send_sigstop_callback): New.
2294 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2295 pass them down. If SUSPEND, also increment the lwp's suspend
2296 count.
2297 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2298 (need_step_over_p): Don't consider suspended LWPs.
2299 (start_step_over): Adjust.
2300 (proceed_one_lwp): Change return type to int, add new `except'
2301 parameter and handle it.
2302 (unsuspend_and_proceed_one_lwp): New.
2303 (proceed_all_lwps): Use find_inferior instead of
2304 for_each_inferior.
2305 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2306 also decrement the suspend count of LWPs. Pass `except' down,
2307 instead of hacking its suspend count.
2308 (linux_pause_all): Add `freeze' parameter. Adjust.
2309 (linux_unpause_all): New.
2310 (linux_target_ops): Install linux_unpause_all.
2311 * server.c (handle_status): Adjust.
2312 * target.h (struct target_ops): New fields `unpause_all' and
2313 `cancel_breakpoints'. Add new parameter to `pause_all'.
2314 (pause_all): Add new `freeze' parameter.
2315 (unpause_all): New.
2316 (cancel_breakpoints): New.
2317 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2318 cancel breakpoints.
2319 (cmd_qtstart): Pause threads.
2320 (stop_tracing): Pause threads, and cancel breakpoints.
2321 * win32-low.c (win32_target_ops): Adjust.
2322
2323 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2324
2325 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2326 the inferior right away from here...
2327 (linux_wait_1): ... to here, and adjust to check the thread's
2328 last_resume_kind instead of the lwp's step or stop_expected flags.
2329
2330 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2331
2332 * README: Use consistent `GDB' and `GDBserver' spellings.
2333
2334 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2335
2336 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2337 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2338 (linux_detach_one_lwp): Assume the lwp is stopped.
2339 (any_thread_of): Delete.
2340 (linux_detach): Stop all lwps here. Don't blindly delete all
2341 breakpoints.
2342 (delete_lwp_callback): New.
2343 (linux_mourn): Delete all lwps of the process that is gone.
2344 (linux_wait_1): Don't delete the last lwp of the process here.
2345 * mem-break.h (mark_breakpoints_out): Declare.
2346 * mem-break.c (mark_breakpoints_out): New.
2347 (free_all_breakpoints): Use it.
2348 * server.c (handle_target_event): If the process is gone, mark
2349 breakpoints out.
2350 * thread-db.c (struct thread_db) <create_bp>: New field.
2351 (thread_db_enable_reporting): Fix prototype. Store a thread event
2352 breakpoint reference in the thread_db struct.
2353 (thread_db_load_search): Clear the thread_db object.
2354 (try_thread_db_load_1): Ditto.
2355 (switch_to_process): New.
2356 (disable_thread_event_reporting): Use it.
2357 (remove_thread_event_breakpoints): New.
2358 (thread_db_detach, thread_db_mourn): Use it.
2359
2360 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2361
2362 * linux-low.c (linux_enable_event_reporting): New.
2363 (linux_wait_for_event_1, handle_extended_wait): Use it.
2364
2365 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2366
2367 * linux-low.c (linux_kill_one_lwp, linux_kill)
2368 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2369 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2370 SIGSTOP even if the LWP is stopped.
2371 (send_sigstop_callback): New.
2372 (stop_all_lwps): Use send_sigstop_callback instead.
2373 (linux_resume_one_thread): Adjust.
2374 (proceed_one_lwp): Still proceed an LWP that the client has
2375 requested to stop, if we haven't reported it as stopped yet. Make
2376 sure that LWPs the client want stopped, have a pending SIGSTOP.
2377
2378 2010-04-26 Doug Evans <dje@google.com>
2379
2380 * server.c (handle_general_set): Make static.
2381
2382 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2383 Print received char after testing for error/eof instead of before.
2384 (input_interrupt): Tweak comment.
2385
2386 2010-04-23 Doug Evans <dje@google.com>
2387
2388 * server.c (start_inferior): Print inferior argv if --debug.
2389
2390 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2391
2392 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2393 * nto-x86-low.c: Include server.h
2394
2395 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2396
2397 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2398 be consistent with other sources of this directory.
2399 (init_registers_amd64): Correct name of source file of this function
2400 in the comment.
2401
2402 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2403
2404 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2405 64-bit executables.
2406
2407 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2408
2409 * win32-i386-low.c: Add 64-bit support.
2410 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2411 (init_registers_amd64): Declare.
2412 (mappings): Add 64-bit version of array.
2413 (init_windows_x86): New function.
2414 (the_low_target): Change init_arch field to init_windows_x86.
2415
2416 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2417
2418 * win32-low.c: Adapt to support also 64-bit architecture.
2419 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2420 (get_image_name): Use SIZE_T type for local variable `done'.
2421 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2422 (toolhelp_get_dll_name): Idem.
2423 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2424 Use uintptr_t typecast to avoid warning.
2425 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2426 (handle_exception): Use phex_nz to avoid warning.
2427 (win32_wait): Remove unused local variable `process'.
2428
2429 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2430
2431 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2432 `amd64-avx.o'.
2433
2434 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2435
2436 * configure.ac: Use `ws2_32' library for srv_mingw.
2437 * configure: Regenerate.
2438 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2439 * remote-utils.c: Likewise.
2440
2441 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2442
2443 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2444 if __x86_64__ is defined.
2445
2446 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2447
2448 * configure: Regenerate.
2449
2450 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2451
2452 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2453 * target.h (target_ops): New get_tib_address field.
2454 * win32-low.h (win32_thread_info): Add thread_local_base field.
2455 * win32-low.c (child_add_thread): Add tlb argument.
2456 Set thread_local_base field to TLB.
2457 (get_child_debug_event): Adapt to child_add_thread change.
2458 (win32_get_tib_address): New function.
2459 (win32_target_ops): Set get_tib_address field to
2460 win32_get_tib_address.
2461 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2462
2463 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2464
2465 * linux-low.c (linux_mourn): Also remove the process.
2466 * server.c (handle_target_event): Don't remove the process here.
2467 * nto-low.c (nto_mourn): New.
2468 (nto_target_ops): Install it.
2469 * spu-low.c (spu_mourn): New.
2470 (spu_target_ops): Install it.
2471 * win32-low.c (win32_mourn): New.
2472 (win32_target_ops): Install it.
2473
2474 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2475
2476 * server.h (buffer_xml_printf): Remove redundant `;'.
2477
2478 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2479
2480 * regcache.c (set_register_cache): Invalidate regcaches before
2481 changing the register cache layout.
2482 (regcache_invalidate_one): Allow a NULL regcache.
2483 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2484 regcaches before changing the register cache layout or the target
2485 regsets.
2486
2487 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2488
2489 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2490 variable warning on Linux/x86-64.
2491
2492 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2493
2494 GDBserver disconnected tracing support.
2495
2496 * linux-low.c (linux_remove_process): Delete.
2497 (add_lwp): Don't set last_resume_kind here.
2498 (linux_kill): Use `mourn'.
2499 (linux_detach): Use `thread_db_detach', and `mourn'.
2500 (linux_mourn): New.
2501 (linux_attach_lwp_1): Adjust comment.
2502 (linux_attach): last_resume_kind moved the thread_info; adjust.
2503 (status_pending_p_callback): Adjust.
2504 (linux_wait_for_event_1): Adjust.
2505 (count_events_callback, select_singlestep_lwp_callback)
2506 (select_event_lwp_callback, cancel_breakpoints_callback)
2507 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2508 (proceed_one_lwp): Adjust.
2509 (linux_async): Add debug output.
2510 (linux_thread_stopped): New.
2511 (linux_pause_all): New.
2512 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2513 linux_pause_all.
2514 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2515 (thread_db_free): Delete declaration.
2516 (thread_db_detach, thread_db_mourn): Declare.
2517 * thread-db.c (thread_db_init): Use thread_db_mourn.
2518 (thread_db_free): Delete, split in two.
2519 (disable_thread_event_reporting): New.
2520 (thread_db_detach): New.
2521 (thread_db_mourn): New.
2522
2523 * server.h (struct thread_info) <last_resume_kind>: New field.
2524 <attached>: Add comment.
2525 <gdb_detached>: New field.
2526 (handler_func): Change return type to int.
2527 (handle_serial_event, handle_target_event): Ditto.
2528 (gdb_connected): Declare.
2529 (tracing): Delete.
2530 (disconnected_tracing): Declare.
2531 (stop_tracing): Declare.
2532
2533 * server.c (handle_query) <qSupported>: Report support for
2534 disconnected tracing.
2535 (queue_stop_reply_callback): Account for running threads.
2536 (gdb_wants_thread_stopped): New.
2537 (gdb_wants_all_threads_stopped): New.
2538 (gdb_reattached_process): New.
2539 (handle_status): Clear the `gdb_detached' flag of all processes.
2540 In all-stop, stop all threads.
2541 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2542 (process_serial_event): If the remote connection breaks, or if an
2543 exit was forced with "monitor exit", force an event loop exit.
2544 Handle disconnected tracing on detach.
2545 (handle_serial_event): Adjust.
2546 (handle_target_event): If GDB isn't connected, forward events back
2547 to the inferior, unless the last process exited, in which case,
2548 exit gdbserver. Adjust interface.
2549
2550 * remote-utils.c (remote_open): Don't block in accept. Instead
2551 register an event loop source on the listen socket file
2552 descriptor. Refactor bits into ...
2553 (listen_desc): ... this new global.
2554 (gdb_connected): ... this new function.
2555 (enable_async_notification): ... this new function.
2556 (handle_accept_event): ... this new function.
2557 (remote_close): Clear remote_desc.
2558
2559 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2560
2561 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2562 New fields.
2563 (mourn_inferior): Define.
2564 (target_process_qsupported): Avoid the dangling else problem.
2565 (thread_stopped): Define.
2566 (pause_all): Define.
2567 (target_waitstatus_to_string): Declare.
2568 * target.c (target_waitstatus_to_string): New.
2569
2570 * tracepoint.c (tracing): Make extern.
2571 (disconnected_tracing): New.
2572 (stop_tracing): Make extern. Handle tracing stops due to GDB
2573 disconnecting.
2574 (cmd_qtdisconnected): New.
2575 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2576 (handle_tracepoint_general_set): Handle QTDisconnected.
2577
2578 * event-loop.c (event_handler_func): Change return type to int.
2579 (process_event): Bail out if the event handler wants the event
2580 loop to stop.
2581 (handle_file_event): Ditto.
2582 (start_event_loop): Bail out if the event handler wants the event
2583 loop to stop.
2584
2585 * nto-low.c (nto_target_ops): Adjust.
2586 * spu-low.c (spu_wait): Don't remove the process here.
2587 (spu_target_ops): Adjust.
2588 * win32-low.c (win32_wait): Don't remove the process here.
2589 (win32_target_ops): Adjust.
2590
2591 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2592
2593 * regcache.c (realloc_register_cache): Invalidate inferior's
2594 regcache before recreating it.
2595
2596 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2597
2598 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2599
2600 2010-04-09 Stan Shebs <stan@codesourcery.com>
2601 Pedro Alves <pedro@codesourcery.com>
2602
2603 * server.h (LONGEST): New.
2604 (struct thread_info) <while_stepping>: New field.
2605 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2606 Declare.
2607 (initialize_tracepoint, handle_tracepoint_general_set)
2608 (handle_tracepoint_query, tracepoint_finished_step)
2609 (tracepoint_was_hit, release_while_stepping_state_list):
2610 (current_traceframe): Declare.
2611 * server.c (handle_general_set): Handle tracepoint packets.
2612 (read_memory): New.
2613 (write_memory): New.
2614 (handle_search_memory_1): Use read_memory.
2615 (handle_query): Report support for conditional tracepoints, trace
2616 state variables, and tracepoint sources. Handle tracepoint
2617 queries.
2618 (main): Initialize the tracepoints module.
2619 (process_serial_event): Handle traceframe reads/writes.
2620
2621 * linux-low.c (handle_tracepoints): New.
2622 (linux_wait_1): Call it.
2623 (linux_resume_one_lwp): Handle while-stepping.
2624 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2625 (linux_target_ops): Install them.
2626 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2627 New field.
2628 * linux-x86-low.c (x86_supports_tracepoints): New.
2629 (the_low_target). Install it.
2630
2631 * mem-break.h (delete_breakpoint): Declare.
2632 * mem-break.c (delete_breakpoint): Make external.
2633
2634 * target.h (struct target_ops): Add `supports_tracepoints',
2635 `read_pc', and `write_pc' fields.
2636 (target_supports_tracepoints): Define.
2637 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2638 (phex_nz): New.
2639
2640 * regcache.h (struct regcache) <registers_owned>: New field.
2641 (init_register_cache, regcache_cpy): Declare.
2642 (regcache_read_pc, regcache_write_pc): Declare.
2643 (register_cache_size): Declare.
2644 (supply_regblock): Declare.
2645 * regcache.c (init_register_cache): New.
2646 (new_register_cache): Use it.
2647 (regcache_cpy): New.
2648 (register_cache_size): New.
2649 (supply_regblock): New.
2650 (regcache_read_pc, regcache_write_pc): New.
2651
2652 * tracepoint.c: New.
2653
2654 * Makefile.in (OBS): Add tracepoint.o.
2655 (tracepoint.o): New rule.
2656
2657 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2658
2659 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2660 (i386-mmx.o): New.
2661 (i386-mmx.c): Likewise.
2662 (i386-mmx-linux.o): Likewise.
2663 (i386-mmx-linux.c): Likewise.
2664
2665 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2666 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2667 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2668 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2669
2670 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2671 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2672 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2673
2674 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2675
2676 * Makefile.in (clean): Updated.
2677 (i386-avx.o): New.
2678 (i386-avx.c): Likewise.
2679 (i386-avx-linux.o): Likewise.
2680 (i386-avx-linux.c): Likewise.
2681 (amd64-avx.o): Likewise.
2682 (amd64-avx.c): Likewise.
2683 (amd64-avx-linux.o): Likewise.
2684 (amd64-avx-linux.c): Likewise.
2685
2686 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2687 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2688 (srv_amd64_regobj): Add amd64-avx.o.
2689 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2690 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2691 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2692 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2693 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2694 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2695 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2696
2697 * i387-fp.c: Include "i386-xstate.h".
2698 (i387_xsave): New.
2699 (i387_cache_to_xsave): Likewise.
2700 (i387_xsave_to_cache): Likewise.
2701 (x86_xcr0): Likewise.
2702
2703 * i387-fp.h (i387_cache_to_xsave): Likewise.
2704 (i387_xsave_to_cache): Likewise.
2705 (x86_xcr0): Likewise.
2706
2707 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2708 * linux-crisv32-low.c (target_regsets): Likewise.
2709 * linux-m68k-low.c (target_regsets): Likewise.
2710 * linux-mips-low.c (target_regsets): Likewise.
2711 * linux-ppc-low.c (target_regsets): Likewise.
2712 * linux-s390-low.c (target_regsets): Likewise.
2713 * linux-sh-low.c (target_regsets): Likewise.
2714 * linux-sparc-low.c (target_regsets): Likewise.
2715 * linux-xtensa-low.c (target_regsets): Likewise.
2716
2717 * linux-low.c: Include <sys/uio.h>.
2718 (regsets_fetch_inferior_registers): Support nt_type.
2719 (regsets_store_inferior_registers): Likewise.
2720 (linux_process_qsupported): New.
2721 (linux_target_ops): Add linux_process_qsupported.
2722
2723 * linux-low.h (regset_info): Add nt_type.
2724 (linux_target_ops): Add process_qsupported.
2725
2726 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2727 and <sys/uio.h>.
2728 (init_registers_i386_avx_linux): New.
2729 (init_registers_amd64_avx_linux): Likewise.
2730 (xmltarget_i386_linux_no_xml): Likewise.
2731 (xmltarget_amd64_linux_no_xml): Likewise.
2732 (PTRACE_GETREGSET): Likewise.
2733 (PTRACE_SETREGSET): Likewise.
2734 (x86_fill_xstateregset): Likewise.
2735 (x86_store_xstateregset): Likewise.
2736 (use_xml): Likewise.
2737 (x86_linux_update_xmltarget): Likewise.
2738 (x86_linux_process_qsupported): Likewise.
2739 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2740 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2741 init_registers_i386_linux here. Call
2742 x86_linux_update_xmltarget.
2743 (the_low_target): Add x86_linux_process_qsupported.
2744
2745 * server.c (handle_query): Call target_process_qsupported.
2746
2747 * target.h (target_ops): Add process_qsupported.
2748 (target_process_qsupported): New.
2749
2750 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2751
2752 * inferiors.c (add_thread): Set last_status kind to
2753 TARGET_WAITKIND_IGNORE.
2754 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2755 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2756 (linux_wait_1): Move `thread' local definition to block that uses
2757 it. Don't NULL initialize `event_child'.
2758 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2759 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2760 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2761
2762 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2763
2764 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2765 an extended waitstatus, or by a watchpoint.
2766 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2767 thread was stepping or has been stopped by a watchpoint.
2768
2769 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2770
2771 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2772 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2773 of another, then delete the previous, and validate all
2774 breakpoints.
2775 (validate_inserted_breakpoint): New.
2776 (delete_disabled_breakpoints): New.
2777 (validate_breakpoints): New.
2778 (check_mem_read): Validate breakpoints before trusting their
2779 shadow. Delete disabled breakpoints.
2780 (check_mem_write): Validate breakpoints before trusting they
2781 should be inserted. Delete disabled breakpoints.
2782 * mem-break.h (validate_breakpoints):
2783 * server.c (handle_query): Validate breakpoints when we see a
2784 qSymbol query.
2785
2786 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2787
2788 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2789 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2790 if we could tell there's a GDB breakpoint at stop_pc.
2791 (need_step_over_p): Don't do a step over if we find a GDB
2792 breakpoint at the resume PC.
2793
2794 * mem-break.c (struct raw_breakpoint): New.
2795 (enum bkpt_type): New type `gdb_breakpoint'.
2796 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2797 fields. New field `raw'.
2798 (find_raw_breakpoint_at): New.
2799 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2800 breakpoint instead.
2801 (set_breakpoint_at): Adjust.
2802 (delete_raw_breakpoint): New.
2803 (release_breakpoint): New.
2804 (delete_breakpoint): Rename to...
2805 (delete_breakpoint_1): ... this. Add proc parameter. Use
2806 release_breakpoint. Return ENOENT.
2807 (delete_breakpoint): Reimplement.
2808 (find_breakpoint_at): Delete.
2809 (find_gdb_breakpoint_at): New.
2810 (delete_breakpoint_at): Delete.
2811 (set_gdb_breakpoint_at): New.
2812 (delete_gdb_breakpoint_at): New.
2813 (gdb_breakpoint_here): New.
2814 (set_reinsert_breakpoint): Use release_breakpoint.
2815 (uninsert_breakpoint): Rename to ...
2816 (uninsert_raw_breakpoint): ... this.
2817 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2818 (reinsert_raw_breakpoint): Change parameter type to
2819 raw_breakpoint.
2820 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2821 instead.
2822 (check_breakpoints): Adjust. Use release_breakpoint.
2823 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2824 (breakpoint_inserted_here): Ditto.
2825 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2826 Don't trust the breakpoint's shadow if it is not inserted.
2827 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2828 (delete_all_breakpoints): Adjust.
2829 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2830 use delete_breakpoint_1.
2831
2832 * mem-break.h (breakpoints_supported): Delete declaration.
2833 (set_gdb_breakpoint_at): Declare.
2834 (gdb_breakpoint_here): Declare.
2835 (delete_breakpoint_at): Delete.
2836 (delete_gdb_breakpoint_at): Declare.
2837
2838 * server.h (struct raw_breakpoint): Forward declare.
2839 (struct process_info): New field `raw_breakpoints'.
2840
2841 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2842 breakpoints.
2843
2844 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2845
2846 * linux-low.c (status_pending_p_callback): Fix comment.
2847 (linux_wait_for_event_1): Move most of the internal breakpoint
2848 handling from here...
2849 (linux_wait_1): ... to here.
2850 (count_events_callback): New.
2851 (select_singlestep_lwp_callback): New.
2852 (select_event_lwp_callback): New.
2853 (cancel_breakpoints_callback): New.
2854 (select_event_lwp): New.
2855 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2856 priority to all LWPs that have had events that should be reported
2857 to the client. Cancel breakpoints when about to reporting the
2858 event to the client, not while stopping lwps. No longer cancel
2859 finished single-steps here.
2860 (cancel_finished_single_step): Delete.
2861 (cancel_finished_single_steps): Delete.
2862
2863 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2864
2865 * mem-break.c (enum bkpt_type): New.
2866 (struct breakpoint): New field `type'.
2867 (set_breakpoint_at): Change return type to struct breakpoint
2868 pointer. Set type to `other_breakpoint' by default.
2869 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2870 in the breakpoint list.
2871 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2872 (reinsert_breakpoint): Rename to ...
2873 (reinsert_raw_breakpoint): ... this.
2874 (reinsert_breakpoints_at): Adjust.
2875 * mem-break.h (struct breakpoint): Declare.
2876 (set_breakpoint_at): Change return type to struct breakpoint
2877 pointer.
2878
2879 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2880
2881 * server.c (handle_query): Assign, not compare.
2882
2883 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2884
2885 Teach linux gdbserver to step-over-breakpoints.
2886
2887 * linux-low.c (can_hardware_single_step): New.
2888 (supports_breakpoints): New.
2889 (handle_extended_wait): If stopping threads, read the stop pc of
2890 the new cloned LWP.
2891 (get_pc): New.
2892 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2893 low target doesn't support retrieving the PC.
2894 (add_lwp): Set last_resume_kind to resume_continue.
2895 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2896 (linux_attach): Don't clear stop_expected. Set the lwp's
2897 last_resume_kind to resume_stop.
2898 (linux_detach_one_lwp): Don't check for removed breakpoints.
2899 (check_removed_breakpoint): Delete.
2900 (status_pending_p): Rename to ...
2901 (status_pending_p_callback): ... this. Don't check for removed
2902 breakpoints. Don't consider threads that are stopped from GDB's
2903 perspective.
2904 (linux_wait_for_lwp): Always read the stop_pc here.
2905 (cancel_breakpoint): New.
2906 (step_over_bkpt): New global.
2907 (linux_wait_for_event_1): Implement stepping over breakpoints.
2908 (gdb_wants_lwp_stopped): New.
2909 (gdb_wants_all_stopped): New.
2910 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2911 single-step traps here. Store the thread's last reported target
2912 wait status.
2913 (send_sigstop): Don't clear stop_expected. Always set it,
2914 instead.
2915 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2916 (cancel_finished_single_step): New.
2917 (cancel_finished_single_steps): New.
2918 (wait_for_sigstop): Don't cancel finished single-step traps here.
2919 (linux_resume_one_lwp): Don't check for removed breakpoints.
2920 Don't set `step' on non-hardware step archs.
2921 (linux_set_resume_request): Ignore resume_stop requests if already
2922 stopping or stopped. Set the lwp's last_resume_kind.
2923 (resume_status_pending_p): Don't check for removed breakpoints.
2924 (need_step_over_p): New.
2925 (start_step_over): New.
2926 (finish_step_over): New.
2927 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2928 requests. Clear the thread's last reported target waitstatus.
2929 Don't use the `suspended' flag. Don't consider pending breakpoints.
2930 (linux_resume): Start a step-over if necessary.
2931 (proceed_one_lwp): New.
2932 (proceed_all_lwps): New.
2933 (unstop_all_lwps): New.
2934 * linux-low.h (struct lwp_info): Rewrite comment for the
2935 `suspended' flag. Add the `stop_pc' field. Delete the
2936 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2937 Add `'last_resume_kind' and `need_step_over' fields.
2938 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2939 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2940 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2941 (set_raw_breakpoint_at): New.
2942 (set_breakpoint_at): Rewrite to use it.
2943 (reinsert_breakpoint_handler): Delete.
2944 (set_reinsert_breakpoint): New.
2945 (reinsert_breakpoint_by_bp): Delete.
2946 (delete_reinsert_breakpoints): New.
2947 (uninsert_breakpoint): Rewrite.
2948 (uninsert_breakpoints_at): New.
2949 (reinsert_breakpoint): Rewrite.
2950 (reinsert_breakpoints_at): New.
2951 (check_breakpoints): Rewrite.
2952 (breakpoint_here): New.
2953 (breakpoint_inserted_here): New.
2954 (check_mem_read): Adjust.
2955 * mem-break.h (breakpoints_supported, breakpoint_here)
2956 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2957 (reinsert_breakpoint_by_bp): Delete declaration.
2958 (delete_reinsert_breakpoints): Declare.
2959 (reinsert_breakpoint): Delete declaration.
2960 (reinsert_breakpoints_at): Declare.
2961 (uninsert_breakpoint): Delete declaration.
2962 (uninsert_breakpoints_at): Declare.
2963 (check_breakpoints): Adjust prototype.
2964 * server.h: Adjust include order.
2965 (struct thread_info): Declare here. Add a `last_status' field.
2966
2967 2010-03-23 Michael Snyder <msnyder@vmware.com>
2968
2969 * server.c (crc32): New function.
2970 (handle_query): Add handling for 'qCRC:' request.
2971
2972 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2973
2974 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2975 lwp had been stopped by a watchpoint.
2976
2977 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2978
2979 * server.h (internal_error): Declare.
2980 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2981 * utils.c (internal_error): New function.
2982
2983 2010-03-15 Andreas Schwab <schwab@redhat.com>
2984
2985 * configure.srv: Fix typo setting srv_regobj.
2986
2987 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2988
2989 * linux-low.c (fetch_register): Avoid passing a non string literal
2990 format to `error'.
2991 (usr_store_inferior_registers): Ditto.
2992
2993 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2994
2995 * linux-low.c (linux_write_memory): Bail out early if peeking
2996 memory failed.
2997
2998 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2999
3000 * linux-low.h (struct lwp_info): New fields
3001 `stopped_by_watchpoint' and `stopped_data_address'.
3002 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3003 here, and cache them in the lwp object.
3004 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3005 directly.
3006 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3007 field.
3008 (linux_stopped_by_watchpoint): Rewrite.
3009 (linux_stopped_data_address): Rewrite.
3010
3011 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
3012
3013 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3014 switching the current inferior, not before.
3015
3016 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3017
3018 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3019 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3020 i386-linux.c and amd64-linux.c.
3021 (reg-i386.o): Removed.
3022 (reg-i386.c): Likewise.
3023 (reg-i386-linux.o): Likewise.
3024 (reg-i386-linux.c): Likewise.
3025 (reg-x86-64.o): Likewise.
3026 (reg-x86-64.c): Likewise.
3027 (reg-x86-64-linux.o): Likewise.
3028 (reg-x86-64-linux.c): Likewise.
3029 (i386.o): New.
3030 (i386.c): Likewise.
3031 (i386-linux.o): Likewise.
3032 (i386-linux.c): Likewise.
3033 (amd64.o): Likewise.
3034 (amd64.c): Likewise.
3035 (amd64-linux.o): Likewise.
3036 (amd64-linux.c): Likewise.
3037
3038 * configure.srv (srv_i386_regobj): New.
3039 (srv_i386_linux_regobj): Likewise.
3040 (srv_amd64_regobj): Likewise.
3041 (srv_amd64_linux_regobj): Likewise.
3042 (srv_i386_32bit_xmlfiles): Likewise.
3043 (srv_i386_64bit_xmlfiles): Likewise.
3044 (srv_i386_xmlfiles): Likewise.
3045 (srv_amd64_xmlfiles): Likewise.
3046 (srv_i386_linux_xmlfiles): Likewise.
3047 (srv_amd64_linux_xmlfiles): Likewise.
3048 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3049 srv_xmlfiles to $srv_i386_xmlfiles.
3050 (i[34567]86-*-mingw32ce*): Likewise.
3051 (i[34567]86-*-mingw*): Likewise.
3052 (i[34567]86-*-nto*): Likewise.
3053 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3054 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3055 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3056 (x86_64-*-linux*): Likewise.
3057
3058 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3059 (init_registers_amd64_linux): New.
3060 (x86_arch_setup): Replace init_registers_x86_64_linux with
3061 init_registers_amd64_linux.
3062
3063 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3064
3065 * configure.ac: Check for libdl. If it is not available link against
3066 static libthread_db.
3067 * configure: Regenerate.
3068
3069 2010-02-22 Pedro Alves <pedro@codesourcery.com>
3070
3071 PR9605
3072
3073 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3074 handing a read watchpoint.
3075 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3076
3077 2010-02-12 Doug Evans <dje@google.com>
3078
3079 * linux-low.c (linux_supports_tracefork_flag): Document.
3080 (linux_look_up_symbols): Add comment.
3081
3082 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3083
3084 * regcache.c (supply_register): Clear regcache if buf is NULL.
3085
3086 2010-02-02 Nicolas Roche <roche@sourceware.org>
3087 Joel Brobecker <brobecker@adacore.com>
3088
3089 * inferiors.c (find_inferior): Add function documentation.
3090 (unloaded_dll): Handle the case where the unloaded dll has not
3091 been previously registered in the dll list.
3092
3093 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3094
3095 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3096 (thumb2_breakpoint): New.
3097 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3098
3099 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3100
3101 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3102 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3103 breakpoints.
3104
3105 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3106
3107 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3108
3109 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3110
3111 * linux-s390-low.c (s390_collect_ptrace_register)
3112 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3113
3114 2010-01-21 Doug Evans <dje@google.com>
3115
3116 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3117 (PTRACE_ARG4_TYPE): New macro.
3118 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3119 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3120 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3121 (usr_store_inferior_registers): Ditto.
3122 (linux_read_memory, linux_write_memory): Ditto.
3123 (linux_test_for_tracefork): Ditto.
3124
3125 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3126 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3127
3128 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3129
3130 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3131 target.
3132
3133 2010-01-21 Pedro Alves <pedro@codesourcery.com>
3134
3135 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3136 prototype to take a regcache. Adjust.
3137
3138 2010-01-20 Pedro Alves <pedro@codesourcery.com>
3139
3140 * regcache.h (struct thread_info): Forward declare.
3141 (struct regcache): New.
3142 (new_register_cache): Adjust prototype.
3143 (get_thread_regcache): Declare.
3144 (free_register_cache): Adjust prototype.
3145 (registers_to_string, registers_from_string): Ditto.
3146 (supply_register, supply_register_by_name, collect_register)
3147 (collect_register_as_string, collect_register_by_name): Ditto.
3148 * regcache.c (struct inferior_regcache_data): Delete.
3149 (get_regcache): Rename to ...
3150 (get_thread_regcache): ... this. Adjust. Switch inferior before
3151 fetching registers.
3152 (regcache_invalidate_one): Adjust.
3153 (regcache_invalidate): Fix prototype.
3154 (new_register_cache): Return the new register cache.
3155 (free_register_cache): Change prototype.
3156 (realloc_register_cache): Adjust.
3157 (registers_to_string): Change prototype to take a regcache. Adjust.
3158 (registers_from_string): Ditto.
3159 (register_data): Ditto.
3160 (supply_register): Ditto.
3161 (supply_register_by_name): Ditto.
3162 (collect_register): Ditto.
3163 (collect_register_as_string): Ditto.
3164 (collect_register_by_name): Ditto.
3165 * server.c (process_serial_event): Adjust.
3166 * linux-low.h (regset_fill_func, regset_store_func): Change
3167 prototype.
3168 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3169 Change prototype.
3170 * linux-low.c (get_stop_pc): Adjust.
3171 (check_removed_breakpoint): Adjust.
3172 (linux_wait_for_event): Adjust.
3173 (linux_resume_one_lwp): Adjust.
3174 (fetch_register): Add regcache parameter. Adjust.
3175 (usr_store_inferior_registers): Ditto.
3176 (regsets_fetch_inferior_registers): Ditto.
3177 (regsets_store_inferior_registers): Ditto.
3178 (linux_fetch_registers, linux_store_registers): Ditto.
3179 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3180 regcache. Adjust.
3181 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3182 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3183 prototype to take a regcache.
3184 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3185 * remote-utils.c (convert_ascii_to_int, outreg)
3186 (prepare_resume_reply): Change prototype to take a regcache.
3187 Adjust.
3188 * target.h (struct target_ops) <fetch_registers, store_registers>:
3189 Change prototype to take a regcache.
3190 (fetch_inferior_registers, store_inferior_registers): Change
3191 prototype to take a regcache. Adjust.
3192 * proc-service.c (ps_lgetregs): Adjust.
3193 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3194 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3195 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3196 take a regcache. Adjust.
3197 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3198 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3199 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3200 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3201 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3202 (cris_cannot_fetch_register):
3203 (cris_breakpoint_at): Change prototype to take a regcache.
3204 Adjust.
3205 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3206 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3207 to take a regcache. Adjust.
3208 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3209 Adjust.
3210 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3211 take a regcache. Adjust.
3212 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3213 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3214 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3215 * linux-mips-low.c (mips_get_pc):
3216 (mips_set_pc): Change prototype to take a regcache. Adjust.
3217 (mips_reinsert_addr): Adjust.
3218 (mips_collect_register): Change prototype to take a regcache.
3219 Adjust.
3220 (mips_supply_register):
3221 (mips_collect_register_32bit, mips_supply_register_32bit)
3222 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3223 (mips_store_fpregset): Ditto.
3224 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3225 Ditto.
3226 (parse_spufs_run): Adjust.
3227 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3228 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3229 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3230 take a regcache. Adjust.
3231 * linux-s390-low.c (s390_collect_ptrace_register)
3232 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3233 (s390_set_pc): Change prototype to take a regcache. Adjust.
3234 (s390_arch_setup): Adjust.
3235 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3236 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3237 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3238 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3239 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3240 regcache. Adjust.
3241 (sparc_breakpoint_at): Adjust.
3242 * linux-xtensa-low.c (xtensa_fill_gregset):
3243 (xtensa_store_gregset):
3244 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3245 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3246 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3247 prototype to take a regcache. Adjust.
3248 * win32-arm-low.c (arm_fetch_inferior_register)
3249 (arm_store_inferior_register): Change prototype to take a
3250 regcache. Adjust.
3251 * win32-i386-low.c (i386_fetch_inferior_register)
3252 (i386_store_inferior_register): Change prototype to take a
3253 regcache. Adjust.
3254 * win32-low.c (child_fetch_inferior_registers)
3255 (child_store_inferior_registers): Change prototype to take a
3256 regcache. Adjust.
3257 (win32_wait): Adjust.
3258 (win32_fetch_inferior_registers): Change prototype to take a
3259 regcache. Adjust.
3260 (win32_store_inferior_registers): Adjust.
3261 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3262 store_inferior_register>: Change prototype to take a regcache.
3263
3264 2010-01-20 Doug Evans <dje@google.com>
3265
3266 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3267 #ifdef.
3268 (linux_wait_for_event1, linux_init_signals): Ditto.
3269 (W_STOPCODE): Provide definition if missing.
3270
3271 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3272
3273 * linux-low.c (linux_core_of_thread): New.
3274 (compare_ints, show_process, list_threads): New.
3275 (linux_qxfer_osdata): Report threads and cores.
3276 (linux_target_op): Register linux_core_of_thread.
3277 * remote-utils.c (prepare_resume_reply): Report the core.
3278 (buffer_xml_printf): Support %d specifier.
3279 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3280 New.
3281 (handle_query): Handle qXfer:threads. Announce availability
3282 thereof.
3283 * target.h (struct target_ops): New field core_of_thread.
3284
3285 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3286
3287 * Makefile.in (clean): Remove new generated files.
3288 (reg-s390.o, reg-s390.c): Remove rules.
3289 (reg-s390x.o, reg-s390x.c): Likewise.
3290 (s390-linux32.o, s390-linux32.c): Add rules.
3291 (s390-linux64.o, s390-linux64.c): Likewise.
3292 (s390x-linux64.o, s390x-linux64.c): Likewise.
3293 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3294 * linux-s390-low.c: Include <elf.h>.
3295 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3296 (init_registers_s390): Remove prototype.
3297 (init_registers_s390x): Likewise.
3298 (init_registers_s390_linux32): Add prototype.
3299 (init_registers_s390_linux64): Likewise.
3300 (init_registers_s390x_linux64): Likewise.
3301 (s390_num_regs_3264): New define.
3302 (s390_regmap_3264): New global variable.
3303 (s390_cannot_fetch_register): Remove obsolete check.
3304 (s390_cannot_store_register): Likewise.
3305 (s390_collect_ptrace_register): Handle upper/lower register halves.
3306 (s390_supply_ptrace_register): Likewise.
3307 (s390_fill_gregset): Update to register number changes.
3308 (s390_get_hwcap): New routine.
3309 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3310 Install appropriate regmap and register set.
3311
3312 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3313
3314 * server.c (gdbserver_version): Update copyright year to 2010.
3315 * gdbreplay.c (gdbreplay_version): Likewise.
3316
3317 2009-12-28 Doug Evans <dje@google.com>
3318
3319 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3320 elf/external.h. Include <elf.h> instead but only if necessary.
3321
3322 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3323
3324 * linux-low.c (linux_remove_process): Remove `detaching'
3325 parameter. Don't release/detach from thread_db here.
3326 (linux_kill): Release/detach from thread_db here, ...
3327 (linux_detach): ... and here, before actually detaching.
3328 (linux_wait_1): ... and here, when a process exits.
3329 * thread-db.c (any_thread_of): New.
3330 (thread_db_free): Switch the current inferior to a thread of the
3331 passed in process.
3332
3333 2009-12-21 Doug Evans <dje@google.com>
3334
3335 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3336
3337 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3338 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3339 warning ifndef __NR_tkill. Move setting of errno there too.
3340 Delete unnecessary resetting of errno after syscall.
3341 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3342
3343 * configure.ac: Check for dladdr.
3344 * config.in: Regenerate.
3345 * configure: Regenerate.
3346 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3347 (try_thread_db_load): Update.
3348
3349 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3350
3351 2009-12-18 Doug Evans <dje@google.com>
3352
3353 * event-loop.c: Include unistd.h if it exists.
3354
3355 * linux-low.c (my_waitpid): Move definition away from being in
3356 between linux_tracefork_child/linux_test_for_tracefork.
3357
3358 * gdb_proc_service.h (psaddr_t): Fix type.
3359 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3360 signature to match glibc.
3361
3362 2009-12-16 Doug Evans <dje@google.com>
3363
3364 * linux-low.c (linux_read_memory): Fix argument to read.
3365
3366 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3367
3368 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3369 events, don't leave current_inferior pointing at null.
3370
3371 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3372
3373 * win32-low.c (LOG): Delete.
3374 (OUTMSG): Output to stderr.
3375 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3376 on compile time LOG macro.
3377 (win32_wait): Fix debug output.
3378
3379 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3380
3381 * win32-low.c (win32_add_one_solib): If the dll name is
3382 "ntdll.dll", prepend the system directory to the dll path.
3383
3384 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3385
3386 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3387
3388 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3389 Vladimir Prus <vladimir@codesourcery.com>
3390
3391 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3392 * configure.ac: Check for __mcoldfire__ and set
3393 gdb_cv_m68k_is_coldfire.
3394 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3395 reg-cf.o and reg-m68k.o.
3396 * configure: Regenerated.
3397
3398 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3399
3400 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3401 Pass it to thread_db_free.
3402 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3403 proper `detaching' argument to linux_remove_process.
3404 * linux-low.h (thread_db_free): Add `detaching' parameter.
3405 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3406 to thread_db_free.
3407 (thread_db_free): Add `detaching' parameter. Only
3408 call td_ta_clear_event if detaching from process.
3409
3410 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3411
3412 * thread-db.c (thread_db_free): Fix typo.
3413
3414 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3415
3416 PR gdb/10838
3417 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3418
3419 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3420
3421 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3422 with an i686 compiler.
3423 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3424 needed.
3425 * configure: Rebuilt.
3426
3427 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3428
3429 PR gdb/10783
3430
3431 * server.c (handle_search_memory_1): Correct read_addr initialization
3432 in loop for searching subsequent chunks.
3433
3434 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3435
3436 * configure.ac: New --with-libthread-db option.
3437 * thread-db.c: Allow direct dependence on libthread_db.
3438 (thread_db_free): Adjust.
3439 * config.in: Regenerate.
3440 * configure: Likewise.
3441
3442 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3443
3444 PR gdb/10757
3445 * thread-db.c (attach_thread): New function.
3446 (maybe_attach_thread): Return success/failure.
3447 (find_new_threads_callback): Adjust.
3448 (thread_db_find_new_threads): Loop until no new threads.
3449
3450 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3451
3452 * proc-service.c (ps_lgetregs): Formatting.
3453
3454 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3455
3456 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3457 * configure.ac: Adjust.
3458 * linux-low.h (struct process_info_private): Move members to struct
3459 thread_db.
3460 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3461 * linux-low.c (linux_remove_process): Adjust.
3462 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3463 * server.c (handle_query): Move code ...
3464 (handle_monitor_command): ... here. New function.
3465 * target.h (struct target_ops): New member.
3466 * thread-db.c (struct thread_db): New.
3467 (libthread_db_search_path): New variable.
3468 (thread_db_create_event, thread_db_enable_reporting)
3469 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3470 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3471 (try_thread_db_load_1, dladdr_to_soname): New functions.
3472 (try_thread_db_load, thread_db_load_search): New functions.
3473 (thread_db_init): Search for libthread_db.
3474 (thread_db_free): New function.
3475 (thread_db_handle_monitor_command): Likewise.
3476 * config.in: Regenerate.
3477 * configure: Regenerate.
3478
3479 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3480
3481 * spu-low.c (spu_kill): Wait for inferior to terminate.
3482 Call clear_inferiors.
3483 (spu_detach): Call clear_inferiors.
3484
3485 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3486
3487 * aclocal.m4: Regenerate.
3488 * config.in: Likewise.
3489 * configure: Likewise.
3490
3491 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3492
3493 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3494 (parse_spufs_run): New function.
3495 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3496 (ppc_breakpoint_at): Handle SPU breakpoints.
3497
3498 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3499
3500 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3501 (SPUFS_MAGIC): Define.
3502 (spu_enumerate_spu_ids): New function.
3503 (linux_qxfer_spu): New function.
3504 (linux_target_ops): Install linux_qxfer_spu.
3505
3506 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3507
3508 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3509 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3510 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3511 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3512 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3513 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3514 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3515 (init_registers_powerpc_cell32l): Add prototype.
3516 (init_registers_powerpc_cell64l): Likewise.
3517 (ppc_arch_setup): Detect Cell/B.E. architecture.
3518
3519 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3520
3521 * Makefile.in (datarootdir): New variable.
3522
3523 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3524
3525 * linux-low.c (linux_write_memory): Update debugging output.
3526 * Makefile.in (clean): Add new descriptions.
3527 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3528 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3529 * configure.srv: Add new files for arm*-*-linux*.
3530 * linux-arm-low.c: Add new declarations.
3531 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3532 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3533 (HWCAP_VFPv3D16): New.
3534 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3535 instead of __IWMMXT__.
3536 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3537 (arm_arch_setup): New.
3538 (target_regsets): Remove #ifdef. Add VFP regset.
3539 (the_low_target): Use arm_arch_setup.
3540
3541 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3542
3543 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3544 the main thread again.
3545
3546 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3547
3548 Adding Neutrino gdbserver.
3549 * configure: Regenerated.
3550 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3551 * configure.srv (i[34567]86-*-nto*): New target.
3552 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3553 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3554 (nto_comctrl) [__QNX__]: New function.
3555 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3556
3557 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3558
3559 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3560 srv_tgtobj.
3561
3562 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3563 Pedro Alves <pedro@codesourcery.com>
3564
3565 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3566 don't support CONTEXT_EXTENDED_REGISTERS.
3567 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3568 (the_low_target): Install them.
3569 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3570 failing with ERROR_PIPE_NOT_CONNECTED.
3571
3572 2009-06-30 Doug Evans <dje@google.com>
3573 Pierre Muller <muller@ics.u-strasbg.fr>
3574
3575 Add h/w watchpoint support to x86-linux, win32-i386.
3576 * Makefile.in (SFILES): Add i386-low.c
3577 (i386_low_h): Define.
3578 (i386-low.o): Add dependencies.
3579 (linux-x86-low.o): Add i386-low.h dependency.
3580 (win32-i386-low.o): Ditto.
3581 * i386-low.c: New file.
3582 * i386-low.h: New file.
3583 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3584 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3585 * linux-low.c (linux_add_process): Initialize arch_private.
3586 (linux_remove_process): Free arch_private.
3587 (add_lwp): Initialize arch_private.
3588 (delete_lwp): Free arch_private.
3589 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3590 provided.
3591 * linux-low.h (process_info_private): New member arch_private.
3592 (lwp_info): New member arch_private.
3593 (linux_target_ops): New members new_process, new_thread,
3594 prepare_to_resume.
3595 (ptid_of): New macro.
3596 * linux-x86-low.c: Include stddef.h, i386-low.h.
3597 (arch_process_info): New struct.
3598 (arch_lwp_info): New struct.
3599 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3600 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3601 (i386_dr_low_get_status): New function.
3602 (x86_insert_point, x86_remove_point): New functions.
3603 (x86_stopped_by_watchpoint): New function.
3604 (x86_stopped_data_address): New function.
3605 (x86_linux_new_process, x86_linux_new_thread): New functions.
3606 (x86_linux_prepare_to_resume): New function.
3607 (the_low_target): Add entries for insert_point, remove_point,
3608 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3609 prepare_to_resume.
3610 * server.c (debug_hw_points): New global.
3611 (monitor_show_help): Document set debug-hw-points.
3612 (handle_query): Process "set debug-hw-points".
3613 * server.h (debug_hw_points): Declare.
3614 (paddress): Declare.
3615 * utils.c (NUMCELLS, CELLSIZE): New macros.
3616 (get_sell, xsnprintf, paddress): New functions.
3617 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3618 remove_point, stopped_by_watchpoint, stopped_data_address.
3619 * win32-i386-low.c: Include i386-low.h.
3620 (debug_reg_state): Replaces dr.
3621 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3622 (i386_dr_low_get_status): New function.
3623 (i386_insert_point, i386_remove_point): New functions.
3624 (i386_stopped_by_watchpoint): New function.
3625 (i386_stopped_data_address): New function.
3626 (i386_initial_stuff): Update.
3627 (get_thread_context,set_thread_context,i386_thread_added): Update.
3628 (the_low_target): Add entries for insert_point,
3629 remove_point, stopped_by_watchpoint, stopped_data_address.
3630 * win32-low.c (win32_insert_watchpoint): New function.
3631 (win32_remove_watchpoint): New function.
3632 (win32_stopped_by_watchpoint): New function.
3633 (win32_stopped_data_address): New function.
3634 (win32_target_ops): Add entries for insert_watchpoint,
3635 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3636 * win32-low.h (win32_target_ops): New members insert_point,
3637 remove_point, stopped_by_watchpoint, stopped_data_address.
3638
3639 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3640
3641 * server.c (process_serial_event): Re-return unsupported, not
3642 error, if the type isn't recognized. Re-allow supporting only
3643 insert or remove packets. Also call require_running for
3644 breakpoints. Add missing break statement to default case. Tidy.
3645 * target.h (struct target_ops): Rename insert_watchpoint to
3646 insert_point, and remove_watchpoint to remove_point.
3647
3648 * linux-low.h (struct linux_target_ops): Likewise.
3649 * linux-low.c (linux_insert_watchpoint): Rename to ...
3650 (linux_insert_point): ... this. Adjust.
3651 (linux_remove_watchpoint): Rename to ...
3652 (linux_remove_point): ... this. Adjust.
3653 (linux_target_ops): Adjust.
3654 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3655 (cris_insert_point): ... this.
3656 (cris_remove_watchpoint): Rename to ...
3657 (cris_remove_point): ... this.
3658 (the_low_target): Adjust.
3659
3660 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3661
3662 * server.c (handle_v_kill): Pass signal_pid to
3663 kill_inferior if multi_process is zero.
3664
3665 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3666
3667 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3668 * target.h (target_ops): Comment for *_watchpoint to make it clear
3669 the functions can get types '0' and '1'.
3670
3671 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3672
3673 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3674 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3675 * regcache.c (get_regcache): Likewise.
3676 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3677 * win32-low.c (child_fetch_inferior_registers): Remove check for
3678 regno 0.
3679
3680 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3681 Pedro Alves <pedro@codesourcery.com>
3682
3683 * target.h (struct target_ops) <supports_multi_process>: New
3684 callback.
3685 (target_supports_multi_process): New.
3686 * server.c (handle_query): Even if GDB reports support, only
3687 enable multi-process if the target also supports it. Report
3688 multi-process support only if the target backend supports it.
3689 * linux-low.c (linux_supports_multi_process): New function.
3690 (linux_target_ops): Install it as target_supports_multi_process
3691 callback.
3692
3693 2009-05-24 Doug Evans <dje@google.com>
3694
3695 Global renaming of find_thread_pid to find_thread_ptid.
3696 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3697 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3698 All callers updated.
3699
3700 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3701 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3702 directly.
3703
3704 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3705 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3706 (linux_resume_one_lwp): Ditto.
3707
3708 2009-05-23 Doug Evans <dje@google.com>
3709
3710 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3711 from struct inferior_list_entry * to struct lwp_info *.
3712 All callers updated.
3713
3714 2009-05-13 Doug Evans <dje@google.com>
3715
3716 * linux-x86-low.c: Don't include assert.h.
3717 (x86_siginfo_fixup): Use fatal, not assert.
3718 (x86_arch_setup): Fix comment.
3719
3720 2009-05-12 Doug Evans <dje@google.com>
3721
3722 Biarch support for i386/amd64 gdbserver.
3723 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3724 Add linux-x86-low.c.
3725 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3726 (linux-x86-low.o): Add.
3727 * linux-x86-64-low.c: Delete.
3728 * linux-i386-low.c: Delete.
3729 * linux-x86-low.c: New file.
3730 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3731 linux-x86-low.o.
3732 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3733 linux-x86-low.o.
3734 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3735 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3736 (linux_child_pid_to_exec_file): New function.
3737 (elf_64_header_p, elf_64_file_p): New functions.
3738 (siginfo_fixup): New function.
3739 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3740 give target a chance to convert layout.
3741 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3742 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3743
3744 2009-05-07 Doug Evans <dje@google.com>
3745
3746 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3747 (regsets_store_inferior_registers): Ditto.
3748
3749 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3750
3751 PR server/10048
3752
3753 * linux-low.c (must_set_ptrace_flags): Delete.
3754 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3755 of the global.
3756 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3757 `lwp->must_set_ptrace_flags' instead.
3758 (linux_wait_for_event_1): Set ptrace options here.
3759 (linux_wait_1): ... not here.
3760
3761 2009-04-30 Doug Evans <dje@google.com>
3762
3763 * inferiors.c (started_inferior_callback): New function.
3764 (attached_inferior_callback): New function.
3765 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3766 * server.c (print_started_pid, print_attached_pid): New functions.
3767 (detach_or_kill_for_exit): New function.
3768 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3769 * server.h (have_started_inferiors_p): Declare.
3770 (have_attached_inferiors_p): Declare.
3771
3772 * inferiors.c (remove_process): Fix memory leak, free process.
3773 * linux-low.c (linux_remove_process): New function.
3774 (linux_kill): Call it instead of remove_process.
3775 (linux_detach, linux_wait_1): Ditto.
3776
3777 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3778
3779 * configure.srv: Add x86 Windows CE target.
3780
3781 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3782
3783 * inferiors.c (get_thread_process): Make global.
3784 * server.h (get_thread_process): Add prototype.
3785 * thread-db.c (find_one_thread): Use get_thread_process
3786 instead of current_process.
3787 (thread_db_get_tls_address): Do not crash if called when
3788 thread layer is not yet initialized.
3789
3790 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3791
3792 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3793 * spu-low.c (current_tid): Rename to ...
3794 (current_ptid): ... this.
3795 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3796 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3797 ptid_get_lwp (current_ptid) instead of current_tid.
3798 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3799 instead of current_tid. Use find_process_pid to verify pid
3800 argument is valid. Pass proper argument to remove_process.
3801 (spu_thread_alive): Compare current_ptid instead of current_tid.
3802 (spu_resume): Likewise.
3803
3804 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3805
3806 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3807 variable.
3808
3809 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3810
3811 Implement the multiprocess extensions, and add linux multiprocess
3812 support.
3813
3814 * server.h (ULONGEST): Declare.
3815 (struct ptid, ptid_t): New.
3816 (minus_one_ptid, null_ptid): Declare.
3817 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3818 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3819 (struct inferior_list_entry): Change `id' type from unsigned from
3820 to ptid_t.
3821 (struct sym_cache, struct breakpoint, struct
3822 process_info_private): Forward declare.
3823 (struct process_info): Declare.
3824 (current_process): Declare.
3825 (all_processes): Declare.
3826 (initialize_inferiors): Declare.
3827 (add_thread): Adjust to use ptid_t.
3828 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3829 (add_process, remove_process, find_thread_pid): Declare.
3830 (find_inferior_id): Adjust to use ptid_t.
3831 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3832 (multi_process): Declare.
3833 (push_event): Adjust to use ptid_t.
3834 (read_ptid, write_ptid): Declare.
3835 (prepare_resume_reply): Adjust to use ptid_t.
3836 (clear_symbol_cache): Declare.
3837 * inferiors.c (all_processes): New.
3838 (null_ptid, minus_one_ptid): New.
3839 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3840 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3841 (add_thread): Change unsigned long to ptid. Remove gdb_id
3842 parameter. Adjust.
3843 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3844 (gdb_id_to_thread): Rename to ...
3845 (find_thread_pid): ... this. Change unsigned long to ptid.
3846 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3847 (loaded_dll, pull_pid_from_list): Adjust.
3848 (add_process, remove_process, find_process_pid)
3849 (get_thread_process, current_process, initialize_inferiors): New.
3850 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3851 (struct target_waitstatus) <related_pid>: Ditto.
3852 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3853 return type to int.
3854 (struct target_ops) <join>: Add `pid' argument.
3855 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3856 (struct target_ops) <wait>: Add `ptid' field. Change return type
3857 to ptid.
3858 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3859 (mywait): Add `ptid' argument. Change return type to ptid_t.
3860 (target_pid_to_str): Declare.
3861 * target.c (set_desired_inferior): Adjust to use ptids.
3862 (mywait): Add new `ptid' argument. Adjust.
3863 (target_pid_to_str): New.
3864 * mem-break.h (free_all_breakpoints): Declare.
3865 * mem-break.c (breakpoints): Delelete.
3866 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3867 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3868 to use per-process breakpoint list.
3869 (free_all_breakpoints): New.
3870 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3871 (symbol_cache, all_symbols_looked_up): Delete.
3872 (hexchars): New.
3873 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3874 read_ptid): New.
3875 (prepare_resume_reply): Change ptid argument's type from unsigned
3876 long to ptid_t. Adjust. Implement W;process and X;process.
3877 (free_sym_cache, clear_symbol_cache): New.
3878 (look_up_one_symbol): Adjust to per-process symbol cache. *
3879 * server.c (cont_thread, general_thread, step_thread): Change type
3880 to ptid_t.
3881 (attached): Delete.
3882 (multi_process): New.
3883 (last_ptid): Change type to ptid_t.
3884 (struct vstop_notif) <ptid>: Change type to ptid_t.
3885 (queue_stop_reply, push_event): Change `ptid' argument's type to
3886 ptid_t.
3887 (discard_queued_stop_replies): Add `pid' argument.
3888 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3889 changes. Don't reference the `attached' global.
3890 (attach_inferior): Adjust to mywait interface changes.
3891 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3892 features. Handle and report "multiprocess+". Handle
3893 "qAttached:PID".
3894 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3895 changes.
3896 (handle_v_kill): New.
3897 (handle_v_stopped): Adjust to use target_pid_to_str.
3898 (handle_v_requests): Allow multiple attaches and runs when
3899 multiprocess extensions are in effect. Handle "vKill".
3900 (myresume): Adjust to use ptids.
3901 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3902 (handle_status): Adjust to discard_queued_stop_replies interface
3903 change.
3904 (first_thread_of, kill_inferior_callback)
3905 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3906 (main): Call initialize_inferiors. Adjust to use ptids, killing
3907 and detaching from all inferiors. Handle multiprocess packet
3908 variants.
3909 * linux-low.h: Include gdb_proc_service.h.
3910 (struct process_info_private): New.
3911 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3912 <lwpid_of>: Use ptid_get_lwp.
3913 (get_lwp_thread): Adjust.
3914 (struct lwp_info): Add `dead' member.
3915 (find_lwp_pid): Declare.
3916 * linux-low.c (thread_db_active): Delete.
3917 (new_inferior): Adjust comment.
3918 (inferior_pid): Delete.
3919 (linux_add_process): New.
3920 (handle_extended_wait): Adjust.
3921 (add_lwp): Change unsigned long to ptid.
3922 (linux_create_inferior): Add process to processes table. Adjust
3923 to use ptids. Don't set new_inferior here.
3924 (linux_attach_lwp): Rename to ...
3925 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3926 it. Adjust to use ptids.
3927 (linux_attach_lwp): New.
3928 (linux_attach): Add process to processes table. Don't set
3929 new_inferior here.
3930 (struct counter): New.
3931 (second_thread_of_pid_p, last_thread_of_process_p): New.
3932 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3933 multiple processes.
3934 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3935 processes. Remove process from process table.
3936 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3937 to multiple processes.
3938 (any_thread_of): New.
3939 (linux_detach): Add `pid' argument, and handle it. Remove process
3940 from processes table.
3941 (linux_join): Add `pid' argument. Handle it.
3942 (linux_thread_alive): Change unsighed long argument to ptid_t.
3943 Consider dead lwps as not being alive.
3944 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3945 threads we're not interested in.
3946 (same_lwp, find_lwp_pid): New.
3947 (linux_wait_for_lwp): Change `pid' argument's type from int to
3948 ptid_t. Adjust.
3949 (linux_wait_for_event): Rename to ...
3950 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3951 from int to ptid_t. Adjust.
3952 (linux_wait_for_event): New.
3953 (linux_wait_1): Add `ptid' argument. Change return type to
3954 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3955 that exit from the process table.
3956 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3957 Adjust.
3958 (mark_lwp_dead): New.
3959 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3960 stopping all threads, mark its main lwp as dead.
3961 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3962 ptids.
3963 (fetch_register, usr_store_inferior_registers)
3964 (regsets_fetch_inferior_registers)
3965 (regsets_store_inferior_registers, linux_read_memory)
3966 (linux_write_memory): Inline `inferior_pid'.
3967 (linux_look_up_symbols): Adjust to use per-process
3968 `thread_db_active'.
3969 (linux_request_interrupt): Adjust to use ptids.
3970 (linux_read_auxv): Inline `inferior_pid'.
3971 (initialize_low): Don't reference thread_db_active.
3972 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3973 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3974 (ps_getpid): Return the pid of the current inferior.
3975 * thread-db.c (proc_handle, thread_agent): Delete.
3976 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3977 per-process data.
3978 (find_one_thread): Change argument type to ptid_t. Adjust to
3979 per-process data.
3980 (maybe_attach_thread): Adjust to per-process data and ptids.
3981 (thread_db_find_new_threads): Ditto.
3982 (thread_db_init): Ditto.
3983 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3984 processes table. Adjust to use ptids.
3985 (spu_kill, spu_detach): Adjust interface. Remove process from
3986 processes table.
3987 (spu_join, spu_thread_alive): Adjust interface.
3988 (spu_wait): Adjust interface. Remove process from processes
3989 table. Adjust to use ptids.
3990 * win32-low.c (current_inferior_tid): Delete.
3991 (current_inferior_ptid): New.
3992 (debug_event_ptid): New.
3993 (thread_rec): Take a ptid. Adjust.
3994 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3995 (child_delete_thread): Ditto.
3996 (do_initial_child_stuff): Add `attached' argument. Add process to
3997 processes table.
3998 (child_fetch_inferior_registers, child_store_inferior_registers):
3999 Adjust.
4000 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4001 (win32_attach): Pass 1 to do_initial_child_stuff.
4002 (win32_kill): Adjust interface. Remove process from processes
4003 table.
4004 (win32_detach): Ditto.
4005 (win32_join): Adjust interface.
4006 (win32_thread_alive): Take a ptid.
4007 (win32_resume): Adjust to use ptids.
4008 (get_child_debug_event): Ditto.
4009 (win32_wait): Adjust interface. Remove exiting process from
4010 processes table.
4011
4012 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4013
4014 Non-stop mode support.
4015
4016 * server.h (non_stop): Declare.
4017 (gdb_client_data, handler_func): Declare.
4018 (delete_file_handler, add_file_handler, start_event_loop):
4019 Declare.
4020 (handle_serial_event, handle_target_event, push_event)
4021 (putpkt_notif): Declare.
4022 * target.h (enum resume_kind): New.
4023 (struct thread_resume): Replace `step' field by `kind' field.
4024 (TARGET_WNOHANG): Define.
4025 (struct target_ops) <wait>: Add `options' argument.
4026 <supports_non_stop, async, start_non_stop>: New fields.
4027 (target_supports_non_stop, target_async): New.
4028 (start_non_stop): Declare.
4029 (mywait): Add `options' argument.
4030 * target.c (mywait): Add `options' argument. Print child exit
4031 notifications here.
4032 (start_non_stop): New.
4033 * server.c (non_stop, own_buf, mem_buf): New globals.
4034 (struct vstop_notif): New.
4035 (notif_queue): New global.
4036 (queue_stop_reply, push_event, discard_queued_stop_replies)
4037 (send_next_stop_reply): New.
4038 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4039 interface changes.
4040 (attach_inferior): In non-stop mode, don't wait for the target
4041 here.
4042 (handle_general_set): Handle QNonStop.
4043 (handle_query): When handling qC, return the current general
4044 thread, instead of the first thread of the list.
4045 (handle_query): If the backend supports non-stop mode, include
4046 QNonStop+ in the qSupported query response.
4047 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4048 and non-stop mode.
4049 (handle_v_attach, handle_v_run): Handle non-stop mode.
4050 (handle_v_stopped): New.
4051 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4052 (myresume): Adjust to use resume_kind. Handle non-stop.
4053 (queue_stop_reply_callback): New.
4054 (handle_status): Handle non-stop mode.
4055 (main): Clear non_stop flag on reconnection. Use the event-loop.
4056 Refactor serial protocol handling from here ...
4057 (process_serial_event): ... to this new function. When GDB
4058 selects any thread, select one here. In non-stop mode, wait until
4059 GDB acks all pending events before exiting.
4060 (handle_serial_event, handle_target_event): New.
4061 * remote-utils.c (remote_open): Install remote_desc in the event
4062 loop.
4063 (remote_close): Remove remote_desc from the event loop.
4064 (putpkt_binary): Rename to...
4065 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4066 (putpkt_binary): New as wrapper around putpkt_binary_1.
4067 (putpkt_notif): New.
4068 (prepare_resume_reply): In non-stop mode, don't change the
4069 general_thread.
4070 * event-loop.c: New.
4071 * Makefile.in (OBJ): Add event-loop.o.
4072 (event-loop.o): New rule.
4073
4074 * linux-low.h (pid_of): Moved here.
4075 (lwpid_of): New.
4076 (get_lwp_thread): Use lwpid_of.
4077 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4078 * linux-low.c (pid_of): Delete.
4079 (inferior_pid): Use lwpid_of.
4080 (linux_event_pipe): New.
4081 (target_is_async_p): New.
4082 (delete_lwp): New.
4083 (handle_extended_wait): Use lwpid_of.
4084 (add_lwp): Don't set lwpid field.
4085 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4086 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4087 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4088 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4089 first. Adjust to linux_wait_for_event interface changes. Use
4090 lwpid_of.
4091 (linux_detach): Don't delete the main lwp here.
4092 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4093 (status_pending_p): Don't consider explicitly suspended lwps.
4094 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4095 pointer. Add OPTIONS argument. Change return type to int. Use
4096 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4097 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4098 pointer. Add status pointer argument. Return a pid instead of a
4099 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4100 changes. In non-stop mode, don't switch to a random thread.
4101 (linux_wait): Rename to...
4102 (linux_wait_1): ... this. Add target_options argument, and handle
4103 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4104 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4105 clean exit and signal exit code. Don't stop all threads in
4106 non-stop mode. In all-stop mode, only stop all threads when
4107 reporting a stop to GDB. Handle explicit thread stop requests.
4108 (async_file_flush, async_file_mark): New.
4109 (linux_wait): New.
4110 (send_sigstop): Use lwpid_of.
4111 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4112 interface changes. In non-stop mode, don't switch to a random
4113 thread.
4114 (linux_resume_one_lwp): Use lwpid_of.
4115 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4116 (linux_resume_one_thread): ... this. Handle resume_stop. In
4117 non-stop mode, don't look for pending flag in all threads.
4118 (resume_status_pending_p): Don't consider explicitly suspended
4119 threads.
4120 (my_waitpid): Reimplement. Emulate __WALL.
4121 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4122 Use lwpid_of.
4123 (sigchld_handler, linux_supports_non_stop, linux_async)
4124 (linux_start_non_stop): New.
4125 (linux_target_ops): Register linux_supports_non_stop, linux_async
4126 and linux_start_non_stop.
4127 (initialize_low): Install SIGCHLD handler.
4128 * thread-db.c (thread_db_create_event, find_one_thread)
4129 (thread_db_get_tls_address): Use lwpid_of.
4130 * win32-low.c (win32_detach): Adjust to use resume_kind.
4131 (win32_wait): Add `options' argument.
4132 * spu-low.c (spu_resume): Adjust to use resume_kind.
4133 (spu_wait): Add `options' argument.
4134
4135 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4136
4137 Decouple target code from remote protocol.
4138
4139 * target.h (enum target_waitkind): New.
4140 (struct target_waitstatus): New.
4141 (struct target_ops) <wait>: Return an unsigned long. Take a
4142 target_waitstatus pointer instead of a char pointer.
4143 (mywait): Likewise.
4144 * target.c (mywait): Change prototype to return an unsigned long.
4145 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4146 * server.h (thread_from_wait, old_thread_from_wait): Delete
4147 declarations.
4148 (prepare_resume_reply): Change prototype to take a
4149 target_waitstatus.
4150 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4151 (last_status, last_ptid): New.
4152 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4153 pid instead of a signal.
4154 (attach_inferior): Remove "status" and "signal" parameters.
4155 Adjust.
4156 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4157 not as an address.
4158 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4159 (handle_v_requests, myresume): Remove "status" and "signal"
4160 parameters. Adjust.
4161 (handle_status): New.
4162 (main): Delete local `status'. Adjust.
4163 * remote-utils.c: Include target.h.
4164 (prepare_resume_reply): Change prototype to take a
4165 target_waitstatus. Adjust.
4166
4167 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4168 interface.
4169 * spu-low.c (spu_wait): Adjust.
4170 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4171 Delete.
4172 (win32_wait): Adjust.
4173
4174 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4175
4176 * target.h (struct thread_resume): Delete leave_stopped member.
4177 (struct target_ops): Add a `n' argument to the `resume' callback.
4178 * server.c (start_inferior): Adjust.
4179 (handle_v_cont, myresume): Adjust.
4180 * linux-low.c (check_removed_breakpoint): Adjust to resume
4181 interface change, and to removed leave_stopped field.
4182 (resume_ptr): Delete.
4183 (struct thread_resume_array): New.
4184 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4185 resume interface change.
4186 (linux_continue_one_thread, linux_queue_one_thread)
4187 (resume_status_pending_p): Check if the resume field is NULL
4188 instead of checking the leave_stopped member.
4189 (linux_resume): Adjust to the target resume interface change.
4190 * spu-low.c (spu_resume): Adjust to the target resume interface
4191 change.
4192 * win32-low.c (win32_detach, win32_resume): Ditto.
4193
4194 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4195
4196 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4197 flag.
4198 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4199 pending.
4200 (linux_continue_one_thread): Only preserve the stepping flag if
4201 there's a pending breakpoint.
4202
4203 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4204
4205 * server.c (main): After the inferior having exited, call
4206 remote_close before exiting gdbserver.
4207
4208 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4209
4210 Fix size of FPSCR in Power 7 processors.
4211 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4212 (PPC_FEATURE_HAS_DFP): New #define.
4213 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4214 size of the FPSCR.
4215
4216 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4217
4218 * server.c (handle_query) Whitespace and formatting.
4219
4220 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4221
4222 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4223 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4224 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4225 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4226 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4227 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4228 Makefile.in, configure.ac: Fix whitespace throughout.
4229 * configure: Regenerate.
4230
4231 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4232
4233 * inferiors.c (find_inferior): Make it safe for the callback
4234 function to delete the currently iterated inferior.
4235
4236 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4237
4238 * Makefile.in (linuw_low_h): Move higher.
4239 (thread-db.o): Depend on $(linux_low_h).
4240
4241 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4242
4243 Rename "process" to "lwp" throughout.
4244
4245 * linux-low.c (all_processes): Rename to...
4246 (all_lwps): ... this.
4247 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4248 (add_process): Rename to ...
4249 (add_lwp): ... this. Adjust.
4250 (linux_create_inferior): Adjust.
4251 (linux_attach_lwp): Adjust.
4252 (linux_attach): Adjust.
4253 (linux_kill_one_process): Rename to ...
4254 (linux_kill_one_lwp): ... this. Adjust.
4255 (linux_kill): Adjust.
4256 (linux_detach_one_process): Rename to ...
4257 (linux_detach_one_lwp): ... this. Adjust.
4258 (linux_detach): Adjust.
4259 (check_removed_breakpoint): Adjust.
4260 (status_pending_p): Adjust.
4261 (linux_wait_for_process): Rename to ...
4262 (linux_wait_for_lwp): ... this. Adjust.
4263 (linux_wait_for_event): Adjust.
4264 (send_sigstop): Adjust.
4265 (wait_for_sigstop): Adjust.
4266 (stop_all_processes): Rename to ...
4267 (stop_all_lwps): ... this.
4268 (linux_resume_one_process): Rename to ...
4269 (linux_resume_one_lwp): ... this. Adjust.
4270 (linux_set_resume_request, linux_continue_one_thread)
4271 (linux_queue_one_thread, resume_status_pending_p)
4272 (usr_store_inferior_registers, regsets_store_inferior_registers)
4273 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4274 Adjust.
4275 * linux-low.h (get_process): Rename to ...
4276 (get_lwp): ... this. Adjust.
4277 (get_thread_process): Rename to ...
4278 (get_thread_lwp): ... this. Adjust.
4279 (get_process_thread): Rename to ...
4280 (get_lwp_thread): ... this. Adjust.
4281 (struct process_info): Rename to ...
4282 (struct lwp_info): ... this.
4283 (all_processes): Rename to ...
4284 (all_lwps): ... this.
4285 * proc-service.c (ps_lgetregs): Adjust.
4286 * thread-db.c (thread_db_create_event, find_one_thread)
4287 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4288
4289 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4290
4291 * server.c (handle_query): Handle "qAttached".
4292
4293 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4294
4295 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4296 GPLv3, update license URL.
4297
4298 2009-03-01 Doug Evans <dje@google.com>
4299
4300 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4301 (server_h): Add gdb_signals.h.
4302 (signals.o): Update.
4303 * server.h (target_signal_from_host,target_signal_to_host_p)
4304 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4305
4306 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4307
4308 * remote-utils.c (getpkt): Also generate remote-debug
4309 information if noack_mode is set.
4310
4311 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4312
4313 * server.c (handle_query): Report qXfer:siginfo:read and
4314 qXfer:siginfo:write as supported and handle them.
4315 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4316 * linux-low.c (linux_xfer_siginfo): New.
4317 (linux_target_ops): Set it.
4318
4319 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4320
4321 * server.c (gdbserver_usage): Mention --remote-debug.
4322 (main): Accept '--remote-debug' switch.
4323
4324 2009-01-18 Doug Evans <dje@google.com>
4325
4326 * regcache.c (new_register_cache): No need to check result of xcalloc.
4327 * server.c (handle_search_memory): Back out calls to xmalloc,
4328 result is checked and error is returned to user upon failure.
4329 (handle_query): Ditto. Add more checks for result of malloc.
4330 (handle_v_cont): Check result of malloc, report error back to
4331 user upon failure.
4332 (handle_v_run): Ditto. Call freeargv.
4333 * server.h (freeargv): Declare.
4334 * utils.c (freeargv): New fn.
4335
4336 2009-01-15 Doug Evans <dje@google.com>
4337
4338 * gdbreplay.c (perror_with_name): Make arg const char *.
4339 * server.h (target_signal_to_name): Make return type const char *.
4340 * thread-db.c (thread_db_err_str): Make return type const char *.
4341 * utils.c (perror_with_name): Make arg const char *.
4342
4343 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4344
4345 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4346 when handling a EXIT_PROCESS_DEBUG_EVENT.
4347
4348 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4349
4350 * gdbreplay.c (gdbreplay_version): Update copyright year.
4351 * server.c (gdbserver_version): Likewise.
4352
4353 2009-01-05 Doug Evans <dje@google.com>
4354
4355 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4356 (handle_extended_wait): Improve comment.
4357
4358 2008-12-13 Doug Evans <dje@google.com>
4359
4360 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4361 * server.h (ATTR_MALLOC): New macro.
4362 (xmalloc,xcalloc,xstrdup): Declare.
4363 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4364 * inferiors.c: Ditto.
4365 * linux-low.c: Ditto.
4366 * mem-break.c: Ditto.
4367 * regcache.c: Ditto.
4368 * remote-utils.c: Ditto.
4369 * server.c: Ditto.
4370 * target.c: Ditto.
4371 * win32-low.c: Ditto.
4372
4373 2008-12-12 Doug Evans <dje@google.com>
4374
4375 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4376 in debugging printf.
4377
4378 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4379
4380 2008-12-09 Doug Evans <dje@google.com>
4381
4382 * linux-low.h (struct process_info): Delete member tid, unused.
4383 * thread-db.c (find_one_thread): Update.
4384 (maybe_attach_thread): Update.
4385
4386 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4387
4388 * target.h (struct target_ops): Add qxfer_osdata member.
4389 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4390 and dirent.h.
4391 (linux_qxfer_osdata): New functions.
4392 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4393 callback.
4394 * server.c (handle_query): Handle "qXfer:osdata:read:".
4395 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4396 (buffer_xml_printf): New functions.
4397 * server.h (struct buffer): New.
4398 (buffer_grow_str, buffer_grow_str0): New macros.
4399 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4400 (buffer_xml_printf): Declare.
4401
4402 2008-11-24 Doug Evans <dje@google.com>
4403
4404 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4405
4406 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4407
4408 * server.c (handle_v_run): Always use the supplied argument list.
4409
4410 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4411
4412 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4413 (xtensa_regmap_table): Add entry for scompare1.
4414
4415 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4416
4417 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4418 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4419 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4420 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4421 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4422 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4423 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4424 XML target descriptions.
4425 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4426 when inferior is running on an ISA 2.05 or later processor. Add
4427 special case to return offset for full 64-bit slot of FPSCR when
4428 in 32-bits.
4429
4430 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4431
4432 * Makefile.in (SFILES, clean): Added sparc64 files.
4433 (reg-sparc64.o, reg-sparc64.c): New.
4434 * configure.srv (sparc*-*-linux*): New configuration.
4435 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4436 syscall arguments for SPARC.
4437 (regsets_store_inferior_registers): Likewise.
4438 * linux-sparc-low.c: New file.
4439
4440 2008-10-21 Doug Evans <dje@google.com>
4441
4442 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4443 (READLINE_DIR,READLINE_DEP): Delete.
4444 (INTERNAL_CFLAGS): Update.
4445 (LINTFLAGS): Update.
4446
4447 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4448
4449 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4450 whole argv from the last run, not just argv[0].
4451
4452 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4453
4454 * regcache.c (new_register_cache): Return NULL if the register
4455 cache size isn't known yet.
4456 (free_register_cache): Avoid dereferencing a NULL regcache.
4457
4458 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4459
4460 * configure.srv: Merge MIPS and MIPS64.
4461
4462 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4463
4464 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4465
4466 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4467
4468 * Makefile.in: Add required vsx dependencies.
4469
4470 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4471 Declare init_registers_powerpc_vsx32l.
4472 Declare init_registers_powerpc_vsx64l.
4473 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4474 (ppc_arch_setup): Check for VSX in hwcap.
4475 (ppc_fill_vsxregset): New function.
4476 (ppc_store_vsxregset): New function.
4477 Add new VSX entry in regset_info target_regsets.
4478
4479 * configure.srv: Add new VSX dependencies.
4480
4481 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4482
4483 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4484 (remote_open): Set or clear transport_is_reliable.
4485 (putpkt_binary): Don't expect acks in noack mode.
4486 (getpkt): Don't send ack/nac in noack mode.
4487 * server.c (handle_general_set): Handle QStartNoAckMode.
4488 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4489 qSupported.
4490 (main): Reset noack_mode on every connection.
4491 * server.h (noack_mode): Declare.
4492
4493 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4494
4495 * Makefile.in (GDBREPLAY_OBS): New variable.
4496 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4497
4498 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4499 Daniel Jacobowitz <dan@codesourcery.com>
4500
4501 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4502 (usr_store_inferior_registers): Likewise.
4503 (regsets_store_inferior_registers): Likewise.
4504
4505 2008-07-31 Rolf Jansen <rj@surtec.com>
4506 Pedro Alves <pedro@codesourcery.com>
4507
4508 * configure.ac: Check for memmem declaration.
4509 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4510 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4511 (disable_packet_qfThreadInfo): Unconditionally compile.
4512 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4513 * configure, config.in: Regenerate.
4514
4515 2008-07-28 Doug Kwan <dougkwan@google.com>
4516
4517 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4518 (linux_write_memory): Remove declaration of errno.
4519
4520 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4521
4522 * linux-low.c (handle_extended_wait): Do not use "status"
4523 variable uninitialized.
4524
4525 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4526
4527 * server.c (handle_v_attach): Inhibit reporting dll changes.
4528
4529 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4530
4531 * remote-utils.c (prepare_resume_reply): If requested, don't
4532 output "thread:TID" in the T stop reply.
4533
4534 * server.c (disable_packet_vCont, disable_packet_Tthread)
4535 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4536 (handle_query): If requested, disable support for qC, qfThreadInfo
4537 and qsThreadInfo.
4538 (handle_v_requests): If requested, disable support for vCont.
4539 (gdbserver_show_disableable): New.
4540 (main): Handle --disable-packet and --disable-packet=LIST.
4541
4542 * server.h (disable_packet_vCont, disable_packet_Tthread)
4543 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4544
4545 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4546
4547 * server.c (gdbserver_usage): Mention --version.
4548
4549 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4550
4551 * Makefile.in (gdbreplay.o): New rule.
4552
4553 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4554
4555 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4556 message, not gdbserver.
4557
4558 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4559 Nathan Sidwell <nathan@codesourcery.com>
4560 Joseph Myers <joseph@codesourcery.com>
4561
4562 * acinclude.m4: Include ../../config/acx.m4.
4563 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4564 * configure, config.in: Regenerate.
4565 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4566 * server.c (gdbserver_version): Print PKGVERSION.
4567 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4568 (main): Adjust gdbserver_usage calls.
4569 * gdbreplay.c (version, host_name): Add declarations.
4570 (gdbreplay_version, gdbreplay_usage): New.
4571 (main): Accept --version and --help options.
4572
4573 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4574
4575 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4576 (arm_breakpoint_at): Handle Thumb.
4577 (the_low_target): Add comment.
4578
4579 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4580
4581 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4582
4583 2008-05-09 Doug Evans <dje@google.com>
4584
4585 * server.h (decode_search_memory_packet): Declare.
4586 * remote-utils.c (decode_search_memory_packet): New fn.
4587 * server.c (handle_search_memory_1): New fn.
4588 (handle_search_memory): New fn.
4589 (handle_query): Process qSearch:memory packets.
4590
4591 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4592
4593 * regcache.c (registers_length): Remove.
4594 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4595 full register packet.
4596 * regcache.h (registers_length): Remove prototype.
4597 * server.h (PBUFSIZ): Define to 16384.
4598
4599 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4600
4601 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4602 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4603 powerpc-64l.o, and powerpc-altivec64l.o.
4604 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4605 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4606 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4607 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4608 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4609 to srv_xmlfiles.
4610
4611 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4612 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4613 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4614 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4615 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4616 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4617 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4618 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4619 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4620 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4621 (clean): Update.
4622
4623 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4624 (init_registers_powerpc_32l): ... this new prototype.
4625 (init_registers_powerpc_32): Remove, replace by ...
4626 (init_registers_powerpc_altivec32l): ... this new prototype.
4627 (init_registers_powerpc_e500): Remove, replace by ...
4628 (init_registers_powerpc_e500l): ... this new prototype.
4629 (init_registers_ppc64): Remove, replace by ...
4630 (init_registers_powerpc_64l): ... this new prototype.
4631 (init_registers_powerpc_64): Remove, replace by ...
4632 (init_registers_powerpc_altivec64l): ... this new prototype.
4633 (ppc_num_regs): Set to 73.
4634 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4635 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4636 (ppc_cannot_store_register): Handle orig_r3 and trap.
4637 (ppc_arch_setup): Update init_registers_... calls.
4638 (ppc_fill_gregset): Handle orig_r3 and trap.
4639
4640 * inferiors.c (clear_inferiors): Reset current_inferior.
4641
4642 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4643
4644 * acinclude.m4: Add override.m4.
4645 * configure: Regenerate.
4646
4647 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4648
4649 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4650 initial call to init_register_ppc64.
4651
4652 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4653
4654 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4655 powerpc*-*-linux* case.
4656 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4657
4658 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4659
4660 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4661 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4662 from reg_xmlfiles.
4663 * linux-ppc-low.c: Include <elf.h>.
4664 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4665 (ppc_hwcap): New global variable.
4666 (ppc_regmap): Remove __SPE__ #ifdef sections.
4667 (ppc_regmap_e500): New global variable.
4668 (ppc_cannot_store_register): Update __SPE__ special case.
4669 (ppc_get_hwcap): New function.
4670 (ppc_arch_setup): Use it to determine whether inferior supports
4671 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4672 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4673 Do not access registers if target does not support AltiVec.
4674 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4675 Do not access registers if target does not support SPE.
4676 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4677
4678 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4679
4680 * linux-low.c (disabled_regsets, num_regsets): New.
4681 (use_regsets_p): Delete.
4682 (linux_wait_for_process): Clear disabled_regsets.
4683 (regsets_fetch_inferior_registers): Check and set it.
4684 (regsets_store_inferior_registers): Likewise.
4685 (linux_fetch_registers, linux_store_registers): Do not use
4686 use_regsets_p.
4687 (initialize_low): Allocate disabled_regsets.
4688
4689 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4690
4691 * Makefile.in (LIBOBJS): New.
4692 (OBS): Use LIBOBJS.
4693 (memmem.o): New rule.
4694 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4695 * configure: Regenerated.
4696
4697 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4698
4699 * server.c (handle_query): Never return "unsupported" for
4700 qXfer:features:read queries.
4701
4702 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4703
4704 * server.c (get_features_xml): Fix inverted condition.
4705 (handle_query): Always support qXfer:feature:read.
4706
4707 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4708
4709 * server.c (wrapper_argv): New.
4710 (start_inferior): Handle wrapper_argv. If set, expect an extra
4711 trap.
4712 (gdbserver_usage): Document --wrapper.
4713 (main): Parse --wrapper.
4714
4715 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4716
4717 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4718 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4719 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4720 (ppc_set_pc): Likewise.
4721 (ppc_arch_setup): New function.
4722 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4723 of collect_register.
4724 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4725
4726 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4727
4728 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4729 instead of linux-ppc64-low.o.
4730 * linux-ppc64-low.c: Remove file.
4731 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4732 (linux-ppc64-low.o): Remove rule.
4733
4734 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4735 (init_registers_powerpc_64): Likewise.
4736 (ppc_regmap): Conditionally define depending on __powerpc64__.
4737 (ppc_cannot_store_register): Do not special-case "fpscr" when
4738 compiled on __powerpc64__.
4739 (ppc_collect_ptrace_register): New function.
4740 (ppc_supply_ptrace_register): New function.
4741 (ppc_breakpoint): Change type to "unsigned int".
4742 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4743 (the_low_target): Conditionally provide initializers for the
4744 arch_setup member depending on __powerpc64__. Install
4745 collect_ptrace_register and supply_ptrace_register members.
4746
4747 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4748
4749 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4750 * server.c (gdbserver_xmltarget): Define.
4751 (get_features_xml): Use it to replace "target.xml" and arch_string.
4752
4753 * configure.srv: Remove srv_xmltarget. Add XML files that were
4754 mentioned there to srv_xmlfiles instead. Remove conditional tests
4755 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4756 srv_xmlfiles and srv_regobj to include all possible choices.
4757 * configure.ac (srv_xmltarget): Remove.
4758 (srv_xmlfiles): Do not add "target.xml".
4759 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4760 checks for supplementary target information.
4761 * configure: Regenerate.
4762 * Makefile.in (XML_TARGET): Remove.
4763 (target.xml): Remove rule.
4764 (clean): Do not clean up target.xml.
4765 (.PRECIOUS): Do not mention target.xml.
4766
4767 * target.h (struct target_ops): Remove arch_string member.
4768 * linux-low.c (linux_arch_string): Remove.
4769 (linux_target_ops): Remove arch_string initializer.
4770 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4771 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4772 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4773 * spu-low.c (spu_arch_string): Remove.
4774 (spu_target_ops): Remove arch_string initializer.
4775 * win32-low.c (win32_arch_string): Remove.
4776 (win32_target_ops): Remove arch_string initializer.
4777 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4778 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4779 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4780
4781 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4782
4783 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4784 by collect_ptrace_register and supply_ptrace_register hooks.
4785 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4786 instead of checking for the_low_target.left_pad_xfer.
4787 (usr_store_inferior_registers): Use collect_ptrace_register callback
4788 instead of checking for the_low_target.left_pad_xfer.
4789
4790 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4791 (s390_supply_ptrace_register): Likewise.
4792 (s390_fill_gregset): Call s390_collect_ptrace_register.
4793 (the_low_target): Update.
4794
4795 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4796 (ppc_supply_ptrace_register): Likewise.
4797 (the_low_target): Update.
4798
4799 * linux-i386-low.c (the_low_target): Update.
4800 * linux-x86-64-low.c (the_low_target): Update.
4801
4802 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4803
4804 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4805 reg-s390.o and reg-s390x.o.
4806
4807 * linux-low.c (new_inferior): New global variable.
4808 (linux_create_inferior, linux_attach): Set it.
4809 (linux_wait_for_process): Call the_low_target.arch_setup after the
4810 target has stopped for the first time.
4811 (initialize_low): Do not call the_low_target.arch_setup.
4812
4813 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4814 (s390_set_pc): Likewise.
4815 (s390_arch_setup): New function.
4816 (the_low_target): Use s390_arch_setup as arch_setup routine.
4817
4818 * regcache.c (realloc_register_cache): New function.
4819 (set_register_cache): Call it for each existing regcache.
4820
4821 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4822
4823 * server.h (init_registers): Remove prototype.
4824
4825 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4826 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4827 instead of init_registers ().
4828 * linux-arm-low.c (init_registers_arm): Add prototype.
4829 (init_registers_arm_with_iwmmxt): Likewise.
4830 (the_low_target): Add initializer for arch_setup field.
4831 * linux-cris-low.c (init_registers_cris): Add prototype.
4832 (the_low_target): Add initializer for arch_setup field.
4833 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4834 (the_low_target): Add initializer for arch_setup field.
4835 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4836 (the_low_target): Add initializer for arch_setup field.
4837 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4838 (the_low_target): Add initializer for arch_setup field.
4839 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4840 (the_low_target): Add initializer for arch_setup field.
4841 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4842 (the_low_target): Add initializer for arch_setup field.
4843 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4844 (init_registers_mips64_linux): Likewise.
4845 (the_low_target): Add initializer for arch_setup field.
4846 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4847 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4848 (the_low_target): Add initializer for arch_setup field.
4849 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4850 (init_registers_powerpc_64): Likewise.
4851 (the_low_target): Add initializer for arch_setup field.
4852 * linux-s390-low.c (init_registers_s390): Add prototype.
4853 (init_registers_s390x): Likewise.
4854 (the_low_target): Add initializer for arch_setup field.
4855 * linux-sh-low.c (init_registers_sh): Add prototype.
4856 (the_low_target): Add initializer for arch_setup field.
4857 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4858 (the_low_target): Add initializer for arch_setup field.
4859 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4860 (the_low_target): Add initializer for arch_setup field.
4861
4862 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4863 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4864 instead of init_registers ().
4865 * win32-arm-low.c (init_registers_arm): Add prototype.
4866 (the_low_target): Add initializer for arch_setup field.
4867 * win32-i386-low.c (init_registers_i386): Add prototype.
4868 (the_low_target): Add initializer for arch_setup field.
4869
4870 * spu-low.c (init_registers_spu): Add prototype.
4871 (initialize_low): Call initialie_registers_spu () instead of
4872 initialize_registers ().
4873
4874 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4875
4876 * server.c (handle_v_requests): When handling the vRun and vAttach
4877 packets, if already debugging a process, don't kill it. Return an
4878 error instead.
4879
4880 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4881
4882 * server.c (handle_query): Correct length check.
4883
4884 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4885
4886 * win32-low.c (do_initial_child_stuff): Add process handle
4887 parameter. Set current_process_handle and current_process_id from the
4888 parameters. Clear globals.
4889 (win32_create_inferior): Don't set current_process_handle and
4890 current_process_id here. Instead pass them on the call to
4891 do_initial_child_stuff.
4892 (win32_attach): Likewise.
4893 (win32_clear_inferiors): New.
4894 (win32_kill): Don't close the current process handle or the
4895 current thread handle here. Instead call win32_clear_inferiors.
4896 (win32_detach): Don't open a new handle to the process. Call
4897 win32_clear_inferiors.
4898 (win32_join): Don't rely on current_process_handle; open a new
4899 handle using the process id.
4900 (win32_wait): Call win32_clear_inferiors when the inferior process
4901 has exited.
4902
4903 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4904
4905 * server.c (monitor_show_help): Add "exit".
4906
4907 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4908
4909 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4910 (clean): Add reg-xtensa.c.
4911 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4912 * configure.srv (xtensa*-*-linux*) New target.
4913 * linux-xtensa-low.c: New.
4914 * xtensa-xtregs.c: New.
4915
4916 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4917
4918 * hostio.c: Don't include errno.h.
4919 (errno_to_fileio_errno): Move to hostio-errno.
4920 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4921 error number outputting to the target->hostio_last_error callback.
4922 (hostio_packet_error): Use FILEIO_EINVAL directly.
4923 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4924 calls to hostio_error.
4925 * hostio-errno.c: New.
4926 * server.h (hostio_last_error_from_errno): Declare.
4927 * target.h (target_ops): Add hostio_last_error member.
4928 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4929 as hostio_last_error handler.
4930 * spu-low.c (spu_target_ops): Likewise.
4931 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4932 (wince_hostio_last_error): New functions.
4933 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4934 as hostio_last_error handler.
4935 (win32_target_ops) [!_WIN32_WCE]: Register
4936 hostio_last_error_from_errno as hostio_last_error handler.
4937 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4938 (hostio-errno.o): New rule.
4939 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4940 * configure.srv (srv_hostio_err_objs): New variable. Default to
4941 hostio-errno.o.
4942 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4943 * configure: Regenerate.
4944
4945 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4946
4947 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4948 (linux_kill, linux_detach): Clean up the process list.
4949 * remote-utils.c (remote_open): Improve port number parsing.
4950 (putpkt_binary, input_interrupt): Only send interrupts if the target
4951 is running.
4952 * server.c (extended_protocol): Make static.
4953 (attached): Define earlier.
4954 (exit_requested, response_needed, program_argv): New variables.
4955 (target_running): New.
4956 (start_inferior): Clear attached here.
4957 (attach_inferior): Set attached here.
4958 (require_running): Define.
4959 (handle_query): Use require_running and target_running. Implement
4960 "monitor exit".
4961 (handle_v_attach, handle_v_run): New.
4962 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4963 (gdbserver_usage): Update.
4964 (main): Redo argument parsing. Handle --debug and --multi. Handle
4965 --attach along with other options or after the port. Save
4966 program_argv. Support no initial program. Resynchronize
4967 communication with GDB after an error. Handle "monitor exit".
4968 Use require_running and target_running. Always allow the extended
4969 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4970 restart in extended mode.
4971 * README: Refer to the GDB manual. Update --attach usage.
4972
4973 2007-12-20 Andreas Schwab <schwab@suse.de>
4974
4975 * linux-low.c (STACK_SIZE): Define.
4976 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4977 (linux_test_for_tracefork): Likewise.
4978
4979 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4980
4981 * linux-low.c (linux_wait_for_event): Update messages. Do not
4982 reinsert auto-delete breakpoints.
4983 * mem-break.c (struct breakpoint): Change return type of handler to
4984 int.
4985 (set_breakpoint_at): Update handler type.
4986 (reinsert_breakpoint_handler): Return 1 instead of calling
4987 delete_breakpoint.
4988 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4989 setting a new one.
4990 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4991 * mem-break.h (set_breakpoint_at): Update handler type.
4992 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4993 * win32-low.c (auto_delete_breakpoint): New.
4994 (get_child_debug_event): Use it.
4995
4996 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4997
4998 * configure.ac: Check for pread and pwrite.
4999 * hostio.c (handle_pread): Fall back to lseek and read.
5000 (handle_pwrite): Fall back to lseek and write.
5001 * config.in, configure: Regenerated.
5002
5003 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5004
5005 * server.c (myresume): Add own_buf argument.
5006 (main): Update calls.
5007
5008 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5009
5010 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5011 * remote-utils.c (remote_open): Do not call disable_async_io.
5012 (block_async_io): Delete.
5013 (unblock_async_io): Make static.
5014 (initialize_async_io): New.
5015 * server.c (handle_v_cont): Handle async I/O here.
5016 (myresume): Likewise. Move other common resume tasks here...
5017 (main): ... from here. Call initialize_async_io. Disable async
5018 I/O before the main loop.
5019 * server.h (initialize_async_io): Declare.
5020 (block_async_io, unblock_async_io): Delete prototypes.
5021 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5022
5023 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5024
5025 * remote-utils.c (readchar): Allow binary data in received messages.
5026
5027 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5028
5029 * win32-low.c (attaching): New global.
5030 (win32_create_inferior): Clear the `attaching' global.
5031 (win32_attach): Set the `attaching' global.
5032 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5033 attaching. Only set a breakpoint at the entry point if not
5034 attaching.
5035
5036 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5037
5038 * server.c (main): Don't report dll events on the initial
5039 connection on attaches.
5040
5041 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5042
5043 * server.c (main): Relax numerical bases supported for the pid of
5044 the --attach command line argument.
5045
5046 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5047
5048 * win32-low.c (win32_attach): Call OpenProcess before
5049 DebugActiveProcess, not after. Add last error output to error
5050 call.
5051
5052 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5053
5054 * win32-low.c (win32_get_thread_context)
5055 (win32_set_thread_context): New functions.
5056 (thread_rec): Use win32_get_thread_context.
5057 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5058 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5059 field.
5060
5061 2007-12-03 Leo Zayas
5062 Pedro Alves <pedro_alves@portugalmail.pt>
5063
5064 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5065 global variables.
5066 (child_add_thread): Minor cleanup.
5067 (child_continue): Resume artificially suspended threads before
5068 calling ContinueDebugEvent.
5069 (suspend_one_thread): New.
5070 (fake_breakpoint_event): New.
5071 (get_child_debug_event): Change return type to int. Check here if
5072 gdb sent an interrupt request. If a soft interrupt was requested,
5073 fake a breakpoint event. Return 0 if there is no event to handle,
5074 and 1 otherwise.
5075 (win32_wait): Don't check here if gdb sent an interrupt request.
5076 Ensure there is a valid event to handle.
5077 (win32_request_interrupt): Add soft interruption method as last
5078 resort.
5079
5080 2007-12-03 Leo Zayas
5081 Pedro Alves <pedro_alves@portugalmail.pt>
5082
5083 * win32-low.h (win32_thread_info): Add descriptions to the
5084 structure members. Replace `suspend_count' counter by a
5085 `suspended' flag.
5086 * win32-low.c (thread_rec): Update condition of when to get the
5087 context from the inferior. Rely on ContextFlags being set if it
5088 has already been retrieved. Only suspend the inferior thread if
5089 we haven't already. Warn if that fails.
5090 (continue_one_thread): s/suspend_count/suspended/. Only call
5091 ResumeThread once. Warn if that fails.
5092
5093 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5094
5095 * win32-low.c (win32_wait): Don't read from the inferior when it
5096 has already exited.
5097
5098 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5099
5100 * Makefile.in (win32_low_h): New variable.
5101 (win32-low.o): Add dependency on $(win32_low_h).
5102 (win32-arm-low.o, win32-i386-low.o): New rules.
5103
5104 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5105
5106 * hostio.c: Correct copyright year.
5107
5108 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5109
5110 * Makefile.in (OBS): Add hostio.o.
5111 (hostio.o): New rule.
5112 * server.h (handle_vFile): Declare.
5113 * hostio.c: New file.
5114 * server.c (handle_v_requests): Take packet_len and new_packet_len
5115 for binary packets. Call handle_vFile.
5116 (main): Update call to handle_v_requests.
5117
5118 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5119
5120 * linux-low.c: Include <sched.h>.
5121
5122 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5123
5124 * linux-low.c (linux_tracefork_grandchild): New.
5125 (linux_tracefork_child): Use clone.
5126 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5127
5128 2007-10-31 Joel Brobecker <brobecker@adacore.com>
5129
5130 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5131
5132 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5133
5134 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5135
5136 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5137
5138 * inferiors.c (change_inferior_id): Delete.
5139 (add_pid_to_list, pull_pid_from_list): New.
5140 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5141 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5142 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5143 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5144 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5145 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5146 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5147 (using_threads): Always set to 1.
5148 (handle_extended_wait): New.
5149 (add_process): Do not set TID.
5150 (linux_create_inferior): Set must_set_ptrace_flags.
5151 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5152 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5153 (linux_thread_alive): Rename TID argument to LWPID.
5154 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5155 (linux_wait_for_event): Do not use TID or check using_threads. Update
5156 call to dead_thread_notify. Call handle_extended_wait.
5157 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5158 (send_sigstop): Delete sigstop_sent.
5159 (wait_for_sigstop): Avoid TID.
5160 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5161 (linux_test_for_tracefork): New.
5162 (linux_lookup_signals): Use thread_db_active and
5163 linux_supports_tracefork_flag.
5164 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5165 * linux-low.h (get_process_thread): Avoid TID.
5166 (struct process_ifo): Move thread_known and tid to the end. Remove
5167 sigstop_sent.
5168 (linux_attach_lwp, thread_db_init): Update prototypes.
5169 * server.h (change_inferior_id): Delete prototype.
5170 (add_pid_to_list, pull_pid_from_list): New prototypes.
5171 * thread-db.c (thread_db_use_events): New.
5172 (find_first_thread): Rename to...
5173 (find_one_thread): ...this. Update callers and messages. Do not
5174 call fatal. Check thread_db_use_events. Do not call
5175 change_inferior_id or new_thread_notify.
5176 (maybe_attach_thread): Update. Do not call new_thread_notify.
5177 (thread_db_init): Set thread_db_use_events. Check use_events.
5178 * utils.c (fatal, warning): Correct message prefix.
5179
5180 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5181
5182 * Makefile.in (clean): Remove new files.
5183 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5184 (powerpc-64.o, powerpc-64.c): New rules.
5185 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5186 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5187 with SPE.
5188 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5189 SPE targets.
5190 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5191 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5192 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5193 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5194 (target_regsets): Add AltiVec and SPE register sets.
5195 * configure.ac: Check for AltiVec and SPE.
5196 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5197 (ppc_fill_vrregset, ppc_store_vrregset): New.
5198 (target_regsets): Add AltiVec register set.
5199 * configure: Regenerated.
5200
5201 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5202
5203 * linux-low.c (O_LARGEFILE): Define.
5204 (linux_read_memory): Use /proc/PID/mem.
5205 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5206 * configure, config.in: Regenerated.
5207
5208 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5209
5210 * linux-low.c (linux_wait_for_event): Do not pass signals while
5211 single-stepping.
5212
5213 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5214
5215 * win32-low.c (create_process): New.
5216 (win32_create_inferior): Use create_process instead of
5217 CreateProcess. If create_process failed retry appending an ".exe"
5218 suffix. Store the GetLastError result immediatelly after
5219 create_process calls and use it on the call to error.
5220
5221 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5222
5223 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5224
5225 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5226
5227 * configure.ac: Switch license to GPLv3.
5228
5229 2007-08-01 Michael Snyder <msnyder@access-company.com>
5230
5231 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5232
5233 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5234
5235 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5236 typedef.
5237 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5238 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5239 CloseToolhelp32Snapshot.
5240 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5241 CloseToolhelp32Snapshot.
5242
5243 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5244
5245 * server.c (main): Check for inferior exit before main loop.
5246
5247 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5248
5249 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5250 instead of on tmp_desc.
5251
5252 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5253 Daniel Jacobowitz <dan@codesourcery.com>
5254
5255 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5256 (add_thread): Minor cleanups.
5257 (clear_inferiors): Move lower in the file. Clear the DLL
5258 list.
5259 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5260 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5261 (xml_escape_text): New.
5262 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5263 for qSupported.
5264 (handle_v_cont): Report errors.
5265 (gdbserver_version): Update.
5266 (main): Correct size of own_buf. Do not report initial DLL events.
5267 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5268 (unloaded_dll, xml_escape_text): New.
5269 * win32-low.c (enum target_waitkind): Update comments.
5270 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5271 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5272 (win32_EnumProcessModules, win32_GetModuleInformation)
5273 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5274 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5275 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5276 (win32_Module32First, win32_Module32Next, load_toolhelp)
5277 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5278 (get_child_debug_event): Handle DLL events.
5279 (win32_wait): Likewise.
5280
5281 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5282
5283 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5284 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5285
5286 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5287
5288 * win32-low.c (handle_output_debug_string): Ignore event if not
5289 waiting.
5290
5291 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5292
5293 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5294
5295 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5296
5297 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5298
5299 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5300
5301 * inferiors.c (change_inferior_id): Add comment.
5302 * linux-low.c (check_removed_breakpoint): Add an early
5303 prototype. Improve debug output.
5304 (linux_attach): Doc update.
5305 (linux_detach_one_process, linux_detach): Clean up before releasing
5306 each process.
5307 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5308 * linux-low.h (struct process_info): Doc improvement.
5309 * mem-break.c (delete_all_breakpoints): New.
5310 * mem-break.h (delete_all_breakpoints): New prototype.
5311 * thread-db.c (find_first_thread): New.
5312 (thread_db_create_event): Call it instead of
5313 thread_db_find_new_threads. Clean up unused variables.
5314 (maybe_attach_thread): Remove first thread handling.
5315 (thread_db_find_new_threads): Use find_first_thread.
5316 (thread_db_get_tls_address): Likewise.
5317
5318 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5319
5320 * thread-db.c (thread_db_find_new_threads): Add prototype.
5321 (thread_db_create_event): Check for the main thread before adding
5322 a new thread.
5323 (maybe_attach_thread): Only enable event reporting if TID == 0.
5324 (thread_db_get_tls_address): Check for new threads.
5325
5326 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5327
5328 * linux-low.c (linux_create_inferior): Try execv before execvp.
5329 * spu-low.c (spu_create_inferior): Likewise.
5330
5331 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5332
5333 * linux-low.c (linux_create_inferior): Change execv to execvp.
5334 * spu-low.c (spu_create_inferior): Likewies.
5335
5336 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5337
5338 * Makefile.in (clean): Clean new files instead of deleted ones.
5339 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5340 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5341 rules.
5342 * configure.srv: Specify XML files and new regformats for MIPS and
5343 MIPS64 GNU/Linux.
5344 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5345 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5346 an entry for the restart register.
5347 (mips_cannot_fetch_register, mips_cannot_store_register)
5348 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5349 register names to match the XML descriptions.
5350 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5351 restart register instead of $0.
5352
5353 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5354 Markus Deuling <deuling@de.ibm.com>
5355
5356 * remote-utils.c (decode_xfer_write): New function.
5357 * server.h (decode_xfer_write): Add prototype.
5358 * server.c (handle_query): Add PACKET_LEN argument. Support
5359 qXfer:spu:read and qXfer:spu:write packets.
5360 (main): Pass packet_len to handle_query.
5361 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5362 * target.h (target_ops): Add qxfer_spu.
5363
5364 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5365
5366 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5367 accessing non-seekable spufs files.
5368
5369 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5370
5371 * server.c (handle_query): Add reply for qC packet.
5372
5373 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5374 Leo Zayas <lerele@champenstudios@com>
5375
5376 * server.h (check_remote_input_interrupt_request): New function.
5377 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5378 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5379 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5380 (check_remote_input_interrupt_request): New function.
5381 * server.h (check_remote_input_interrupt_request): Declare.
5382 * win32-low.c (winapi_DebugBreakProcess,
5383 winapi_GenerateConsoleCtrlEvent): New typedefs.
5384 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5385 to 250 ms.
5386 (win32_wait): Check for remote interrupt request
5387 with check_remote_input_interrupt_request.
5388 (win32_request_interrupt): New function.
5389 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5390
5391 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5392
5393 * win32-low.c (debug_registers_changed,
5394 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5395 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5396 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5397 (thread_rec): Get context using the low target.
5398 (child_add_thread): Call thread_added on the low target,
5399 which does the same thing.
5400 (regptr): Delete.
5401 (do_initial_child_stuff): Remove debug registers references.
5402 Set context using the low target. Resume threads after
5403 setting the contexts.
5404 (child_continue): Remove dead variable. Remove debug
5405 registers references.
5406 (child_fetch_inferior_registers): Go through the low target.
5407 (do_child_store_inferior_registers): Remove.
5408 (child_store_inferior_registers): Go through the low target.
5409 (win32_resume): Remove debug registers references.
5410 Set context using the low target.
5411 (handle_exception): Change return type to void. Don't record
5412 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5413 first chance exception.
5414 (get_child_debug_event): Change return type to void. Remove
5415 goto loop. Always return after waiting for debug event.
5416 (win32_wait): Convert to switch statement. Handle spurious
5417 events.
5418
5419 * win32-i386-low.c (debug_registers_changed,
5420 debug_registers_used): New.
5421 (initial_stuff): Rename to ...
5422 (i386_initial_stuff): ... this. Clear debug registers
5423 state variables.
5424 (store_debug_registers): Delete.
5425 (i386_get_thread_context): New.
5426 (load_debug_registers): Delete.
5427 (i386_set_thread_context): New.
5428 (i386_thread_added): New.
5429 (single_step): Rename to ...
5430 (i386_single_step): ... this.
5431 (do_fetch_inferior_registers): Rename to ...
5432 (i386_fetch_inferior_register): ... this.
5433 (i386_store_inferior_register): New.
5434 (the_low_target): Adapt to new interface.
5435
5436 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5437 (arm_get_thread_context): New.
5438 (arm_set_thread_context): New.
5439 (regptr): New.
5440 (do_fetch_inferior_registers): Rename to ...
5441 (arm_fetch_inferior_register): ... this.
5442 (arm_store_inferior_register): New.
5443 (arm_wince_breakpoint): Reimplement as unsigned long.
5444 (arm_wince_breakpoint_len): Define.
5445 (the_low_target): Adapt to new interface.
5446
5447 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5448 load_debug_registers. Add get_thread_context, set_thread_context,
5449 thread_added and store_inferior_register. Rename
5450 fetch_inferior_registers to fetch_inferior_register.
5451 (regptr): Remove declaration.
5452
5453 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5454
5455 * linux-low.c (linux_detach): Change return type to int. Return 0.
5456 * spu-low.c (spu_detach): Likewise.
5457
5458 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5459
5460 * target.h (target_ops): Change return type of detach to int.
5461 Add join.
5462 (join_inferior): New.
5463 * server.c (main): Don't skip detach support on mingw32.
5464 If the inferior doesn't support detaching return error.
5465 Call join_inferior instead of using waitpid.
5466 * linux-low.c (linux_join): New.
5467 (linux_target_op): Add linux_join.
5468 * spu-low.c (spu_join): New.
5469 (spu_target_ops): Add spu_join.
5470 * win32-low.c (win32_detach): Adapt to new interface.
5471 Reopen current_process_handle before detaching. Issue a child
5472 resume before detaching.
5473 (win32_join): New.
5474 (win32_target_op): Add win32_join.
5475
5476 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5477
5478 * win32-low.c (win32-attach): Fix return value.
5479 * target.h (target_ops): Describe ATTACH return values.
5480
5481 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5482
5483 * win32-low.c (GETPROCADDRESS): Define.
5484 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5485 (winapi_DebugSetProcessKillOnExit): Likewise.
5486 (win32_create_inferior): Force usage of ansi CreateProcessA.
5487 (win32_attach): Use GETPROCADDRESS.
5488 (win32_detach): Likewise.
5489
5490 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5491
5492 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5493
5494 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5495
5496 * win32-low.c: Commit leftover changes from 2007-03-29.
5497
5498 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5499
5500 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5501 fields short instead of int. Add explicit padding.
5502 (i387_cache_to_fsave): Remove unnecessary casts.
5503 (i387_fsave_to_cache): Doc fix.
5504 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5505
5506 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5507
5508 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5509 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5510
5511 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5512
5513 * configure.srv (arm*-*-mingw32ce*): Move near the other
5514 arm targets.
5515
5516 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5517
5518 * configure.ac: Add errno checking.
5519 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5520 sys/file.h and malloc.h.
5521 (AC_CHECK_DECLS): Add perror.
5522 (srv_mingwce): Handle.
5523 * configure.srv (i[34567]86-*-cygwin*): Add
5524 win32-i386-low.o to srv_tgtobj.
5525 (i[34567]86-*-mingw*): Likewise.
5526 (arm*-*-mingw32ce*): Add case.
5527 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5528 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5529 [__MINGW32CE__] (strerror): New function.
5530 [__MINGW32CE__] (errno): Define to GetLastError.
5531 [__MINGW32CE__] (COUNTOF): New macro.
5532 (remote_open): Remove extra close call.
5533 * mem-break.c (delete_breakpoint_at): New function.
5534 * mem-break.h (delete_breakpoint_at): Declare.
5535 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5536 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5537 [USE_WIN32API] (read, write): Add char* casts.
5538 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5539 * server.h: Include wincecompat.h on Windows CE.
5540 [HAVE_ERRNO_H]: Check.
5541 (perror): Declare if not declared.
5542 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5543 (perror_with_name): Remove errno declaration.
5544 * wincecompat.h: New.
5545 * wincecompat.c: New.
5546 * win32-low.h: New.
5547 * win32-arm-low.c: New.
5548 * win32-i386-low.c: New.
5549 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5550 (OUTMSG2): Make it safe.
5551 (_T): New macro.
5552 (COUNTOF): New macro.
5553 (NUM_REGS): Get it from the low target.
5554 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5555 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5556 (thread_rec): Let low target handle debug registers.
5557 (child_add_thread): Likewise.
5558 (child_init_thread_list): Likewise.
5559 (continue_one_thread): Likewise.
5560 (regptr): New.
5561 (do_child_fetch_inferior_registers): Move to ...
5562 * win32-i386-low.c: ... here, and rename to ...
5563 (do_fetch_inferior_registers): ... this.
5564 * win32-low.c (child_fetch_inferior_registers):
5565 Go through the low target.
5566 (do_child_store_inferior_registers): Use regptr.
5567 (strwinerror): New function.
5568 (win32_create_inferior): Handle Windows CE.
5569 Use strwinerror instead of strerror on Windows error
5570 codes. Add program to the error output.
5571 Don't close the main thread handle on Windows CE.
5572 (win32_attach): Use coredll.dll on Windows CE.
5573 (win32_kill): Close current process and current
5574 thread handles.
5575 (win32_detach): Use coredll.dll on Windows CE.
5576 (win32_resume): Let low target handle debug registers, and
5577 step request.
5578 (handle_exception): Add/Remove initial breakpoint. Avoid
5579 non-existant WSTOPSIG on Windows CE.
5580 (win32_read_inferior_memory): Cast to remove warning.
5581 (win32_arch_string): Go through the low target.
5582 (initialize_low): Call set_breakpoint_data with the low
5583 target's breakpoint.
5584 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5585 FOP_REGNUM, mappings): Move to ...
5586 * win32-i386-low.c: ... here.
5587 * win32-low.c (win32_thread_info): Move to ...
5588 * win32-low.h: ... here.
5589 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5590 win32-arm-low.c and wincecompat.c.
5591 (all:): Add $EXEEXT.
5592 (install-only:): Likewise.
5593 (gdbserver:): Likewise.
5594 (gdbreplay:): Likewise.
5595 * config.in: Regenerate.
5596 * configure: Regenerate.
5597
5598 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5599
5600 * win32-low.c: Rename typedef thread_info to
5601 win32_thread_info throughout.
5602
5603 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5604
5605 * win32-i386-low.c: Rename to ...
5606 * win32-low.c: ... this.
5607 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5608 * Makefile.in: Likewise.
5609
5610 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5611
5612 * remote-utils.c (monitor_output): Constify msg parameter.
5613 * server.h (monitor_output): Likewise.
5614 * win32-i386-low.c (handle_output_debug_string): New.
5615 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5616 handle_output_debug_string.
5617 (get_child_debug_event): Likewise.
5618
5619 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5620
5621 * server.c (main): Correct strtoul check.
5622
5623 2007-03-27 Jon Ringle <jon@ringle.org>
5624
5625 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5626
5627 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5628
5629 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5630
5631 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5632
5633 * terminal.h: Check HAVE_SGTTY_H.
5634
5635 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5636
5637 * remote-utils.c (remote_open): Print out the assigned port number.
5638
5639 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5640
5641 * remote-utils.c (monitor_output): New function.
5642 * server.c (debug_threads): Define here.
5643 (monitor_show_help): New function.
5644 (handle_query): Handle qRcmd.
5645 (main): Do not handle 'd' packet.
5646 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5647 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5648 of debug_threads.
5649
5650 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5651
5652 * Makefile.in (EXEEXT): New.
5653 (clean): Use $(EXEEXT).
5654
5655 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5656
5657 * target.h (target_ops): Rename send_signal to request_interrupt,
5658 and remove enum target_signal parameter.
5659 * linux-low.c (linux_request_interrupt): Rename from
5660 linux_send_signal, and always send SIGINT.
5661 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5662 and always send SIGINT.
5663 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5664 of send_signal.
5665 (input_interrupt): Likewise.
5666
5667 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5668
5669 * server.c (get_features_xml): Check if target implemented
5670 arch_string.
5671 * win32-i386-low.c (win32_arch_string): New.
5672 (win32_target_ops): Add win32_arch_string as arch_string member.
5673
5674 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5675
5676 * spu-low.c (spu_arch_string): New.
5677 (spu_target_ops): Add spu_arch_string.
5678
5679 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5680
5681 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5682 * configure.ac: Do not check for terminal.h.
5683 * configure, config.in: Regenerated.
5684
5685 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5686
5687 * Makefile.in (OBS): Add $(XML_BUILTIN).
5688 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5689 (clean): Update.
5690 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5691 (arm-with-iwmmxt.c): New.
5692 * config.in, configure: Regenerate.
5693 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5694 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5695 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5696 (arm*-*-linux*): Add iWMMXt and regset support.
5697 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5698 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5699 (arm_store_wmmxregset, target_regsets): New.
5700 * server.c (get_features_xml): Take annex argument. Check builtin
5701 XML documents.
5702 (handle_query): Handle multiple annexes.
5703
5704 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5705
5706 * remote-utils.c [USE_WIN32API] (read, write): Define.
5707 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5708 write.
5709
5710 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5711
5712 * linux-i386-low.c (the_low_target): Set arch_string.
5713 * linux-x86-64-low.c (the_low_target): Likewise.
5714 * linux-low.c (linux_arch_string): New.
5715 (linux_target_ops): Add it.
5716 * linux-low.h (struct linux_target_ops): Add arch_string.
5717 * server.c (write_qxfer_response): Use const void * for DATA.
5718 (get_features_xml): New.
5719 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5720 * target.h (struct target_ops): Add arch_string method.
5721
5722 2007-01-03 Denis Pilat <denis.pilat@st.com>
5723 Daniel Jacobowitz <dan@codesourcery.com>
5724
5725 * linux-low.c (linux_kill): Handle being called with no threads.
5726 * win32-i386-low.c (win32_kill): Likewise.
5727 (get_child_debug_event): Clear current_process_handle.
5728
5729 2006-12-30 Denis PILAT <denis.pilat@st.com>
5730 Daniel Jacobowitz <dan@codesourcery.com>
5731
5732 * remote-utils.c (remote_open): Check the type of specified
5733 serial port devices before opening them.
5734 * server.c (main): Kill the inferior if an error occurs during
5735 the first remote_open.
5736
5737 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5738
5739 * README: Update supported targets.
5740
5741 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5742
5743 * Makefile.in (clean): Remove reg-mips64.c.
5744 (reg-mips64.c, reg-mips64.o): New rules.
5745 * configure.srv: Handle mips64. Include regset support for mips.
5746 * linux-mips-low.c (union mips_register): New.
5747 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5748 (mips_breakpoint, mips_breakpoint_at): Use int.
5749 (mips_collect_register, mips_supply_register)
5750 (mips_collect_register_32bit, mips_supply_register_32bit)
5751 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5752 (mips_store_fpregset, target_regsets): New.
5753 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5754
5755 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5756
5757 * configure.srv: Add target "spu*-*-*".
5758 * Makefile.in (clean): Remove reg-spu.c.
5759 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5760 * spu-low.c: New file.
5761
5762 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5763
5764 * configure.ac: Correct td_thr_tls_get_addr test.
5765 * configure: Regenerated.
5766
5767 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5768
5769 * linux-low.c (linux_wait_for_event): Reformat. Use the
5770 pass_signals array.
5771 * remote-utils.c (decode_address_to_semicolon): New.
5772 * server.c (pass_signals, handle_general_set): New.
5773 (handle_query): Mention QPassSignals for qSupported.
5774 (main): Call handle_general_set.
5775 * server.h (pass_signals, decode_address_to_semicolon): New.
5776
5777 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5778
5779 * server.c (handle_query): Correct error handling for read_auxv.
5780
5781 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5782
5783 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5784 and srv_linux_thread_db to yes.
5785 * linux-s390-low.c (s390_fill_gregset): New function.
5786 (target_regsets): Define data structure.
5787
5788 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5789
5790 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5791 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5792 * config.in, configure: Regenerated.
5793 * inferiors.c (gdb_id_to_thread): New function.
5794 (gdb_id_to_thread_id): Use it.
5795 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5796 * linux-low.h (struct process_info): Add th member.
5797 (thread_db_get_tls_address): New prototype.
5798 * remote-utils.c (decode_address): Make non-static.
5799 * server.c (handle_query): Handle qGetTLSAddr.
5800 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5801 * target.h (struct target_ops): Add get_tls_address.
5802 * thread-db.c (maybe_attach_thread): Save the thread handle.
5803 (thread_db_get_tls_address): New.
5804
5805 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5806
5807 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5808 (linux_resume_one_process): Take a siginfo_t *. Update all
5809 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5810 (struct pending_signals): Add a siginfo_t.
5811 (linux_wait_for_process): Always set last_status.
5812 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5813 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5814 * linux-low.h (struct process_info): Add last_status.
5815
5816 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5817
5818 * remote-utils.c (try_rle): New function.
5819 (putpkt_binary): Use it.
5820
5821 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5822
5823 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5824 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5825 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5826 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5827 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5828 point registers.
5829
5830 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5831
5832 * server.c (terminal_fd): New variable.
5833 (old_foreground_pgrp): Likewise.
5834 (restore_old_foreground_pgrp): New function.
5835 (start_inferior): Record the terminal file descriptor in terminal_fd
5836 and its original foreground group in old_foreground_pgrp. Register
5837 restore_old_foreground_pgrp with atexit().
5838
5839 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5840
5841 * server.c (handle_query): Correct qPart to qXfer.
5842
5843 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5844
5845 * configure.ac: Check for more headers which are missing on
5846 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5847 * configure.srv: Add Cygwin and mingw32.
5848 * remote-utils.c: Don't include headers unconditionally which
5849 are missing on mingw32. Include <winsock.h> for mingw32.
5850 (remote_open): Adjust for mingw32 support. Flush
5851 standard error after writing to it.
5852 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5853 (unblock_async_io, enable_async_io, disable_async_io)
5854 (readchar, getpkt): Update for Winsock support.
5855 (prepare_resume_reply): Expect a protocol signal number.
5856 * server.c: Disable <sys/wait.h> on mingw32.
5857 (start_inferior): Adjust for mingw32 support. Flush
5858 standard error after writing to it.
5859 (attach_inferior): Likewise. Use protocol signal
5860 numbers.
5861 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5862 and names.
5863 * win32-i386-low.c: New file.
5864 * Makefile.in (XM_CLIBS): Set.
5865 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5866 (win32-i386-low.o): New dependency rule.
5867 * linux-low.c (linux_wait): Use target signal numbers.
5868 * target.h (struct target_ops): Doc fix.
5869 * server.h (target_signal_to_name): New prototype.
5870 * gdbreplay.c: Don't include headers unconditionally which
5871 are missing on mingw32. Include <winsock.h> for mingw32.
5872 (remote_close, remote_open): Adjust for Winsock support.
5873 * configure, config.in: Regenerated.
5874
5875 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5876
5877 * server.c (decode_xfer_read, write_qxfer_response): New.
5878 (handle_query): Take a packet length argument. Handle
5879 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5880 the qSupported response.
5881 (main): Update call to handle_query.
5882
5883 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5884
5885 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5886 (putpkt_binary): Renamed from putpkt and adjusted for binary
5887 data.
5888 (putpkt): New wrapper for putpkt_binary.
5889 (readchar): Don't mask off the high bit.
5890 (decode_X_packet): New function.
5891 * server.c (main): Call putpkt_binary if a handler sets the packet
5892 length. Save the length of the incoming packet. Handle 'X'.
5893 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5894
5895 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5896
5897 * server.c (handle_query): Handle qSupported.
5898
5899 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5900
5901 * remote-utils.c (all_symbols_looked_up): New variable.
5902 (look_up_one_symbol): Check it.
5903 * server.h (look_up_one_symbol): New declaration.
5904 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5905
5906 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5907
5908 * Makefile.in (linux-arm-low.o): Update dependencies.
5909 * linux-arm-low.c: Include "gdb_proc_service.h".
5910 (PTRACE_GET_THREAD_AREA): Define.
5911 (ps_get_thread_area): New function.
5912
5913 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5914
5915 * configure.srv (m68k*-*-uclinux*): New target.
5916 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5917 (linux_resume_one_process): Remove extraneous cast.
5918 (linux_read_offsets): New.
5919 (linux_target_op): Add linux_read_offsets on mmuless systems.
5920 * server.c (handle_query): Add qOffsets logic.
5921 * target.h (struct target_ops): Add read_offsets.
5922
5923 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5924
5925 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5926 (PTRACE_GET_THREAD_AREA): Define.
5927 (ps_get_thread_area): New function.
5928 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5929 (linux-x86-64-low.o): Update.
5930
5931 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5932
5933 * configure.ac: Remove checks for prfpregset_t.
5934 * gdb_proc_service.h: New file.
5935 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5936 new "gdb_proc_service.h".
5937 * proc-service.c: Likewise.
5938 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5939 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5940 * Makefile.in (gdb_proc_service_h): Updated.
5941 * configure, config.in: Regenerated.
5942
5943 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5944
5945 * remote-utils.c (prepare_resume_reply): Move declaration
5946 of gdb_id_from_wait to the top of the block.
5947
5948 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5949
5950 * linux-low.c (regsets_store_inferior_registers): Read the regset
5951 from the target before filling it.
5952
5953 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5954
5955 * server.c (attach_inferior): Return SIGTRAP for a successful
5956 attach.
5957
5958 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5959
5960 * Makefile.in (OBS): Add version.o.
5961 (STAGESTUFF): Delete.
5962 (version.o): Add dependencies.
5963 (version.c): Replace rule.
5964 (clean): Remove version.c.
5965 * server.c (gdbserver_version): New.
5966 (gdbserver_usage): Use printf.
5967 (main): Handle --version and --help.
5968 * server.h (version, host_name): Add declarations.
5969
5970 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5971
5972 * linux-arm-low.c:
5973 * linux-arm-low.c:
5974 * inferiors.c:
5975 * i387-fp.h:
5976 * i387-fp.c:
5977 * gdbreplay.c:
5978 * regcache.c:
5979 * proc-service.c:
5980 * mem-break.h:
5981 * mem-break.c:
5982 * linux-x86-64-low.c:
5983 * linux-sh-low.c:
5984 * linux-s390-low.c:
5985 * linux-ppc64-low.c:
5986 * linux-ppc-low.c:
5987 * linux-mips-low.c:
5988 * linux-m68k-low.c:
5989 * linux-m32r-low.c:
5990 * linux-low.h:
5991 * linux-low.c:
5992 * linux-ia64-low.c:
5993 * linux-i386-low.c:
5994 * linux-crisv32-low.c:
5995 * thread-db.c:
5996 * terminal.h:
5997 * target.h:
5998 * target.c:
5999 * server.h:
6000 * server.c:
6001 * remote-utils.c:
6002 * regcache.h:
6003 * utils.c:
6004 * Makefile.in:
6005 * configure.ac:
6006 * gdbserver.1: Add (C) after Copyright. Update the FSF
6007 address.
6008
6009 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6010
6011 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6012 (arm_breakpoint_at): Recognize both breakpoints.
6013 (the_low_target): Use the correct breakpoint instruction.
6014
6015 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6016
6017 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6018 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6019 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6020 (the_low_target): Update.
6021
6022 2005-10-25 Andreas Schwab <schwab@suse.de>
6023
6024 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6025
6026 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6027 (ia64_num_regs): Reduce to 462.
6028
6029 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6030
6031 * acinclude.m4: Correct quoting.
6032 * aclocal.m4: Regenerated.
6033
6034 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6035 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6036 (thread_db_init): Call thread_db_err_str.
6037 * configure.ac: Check for TD_VERSION.
6038 * config.in, configure: Regenerated.
6039
6040 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6041
6042 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6043
6044 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6045
6046 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6047 is not available. Define HAVE_PTRACE_GETREGS if it is.
6048 * config.in, configure: Regenerated.
6049 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6050 * linux-i386-low.c, linux-m68k-low.c: Update to use
6051 HAVE_PTRACE_GETREGS.
6052 * linux-low.c (regsets_fetch_inferior_registers)
6053 (regsets_store_inferior_registers): Only return 0 if we processed
6054 GENERAL_REGS.
6055 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6056 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6057
6058 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6059
6060 * inferiors.c (struct thread_info): Add gdb_id.
6061 (add_thread): Add gdb_id argument.
6062 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6063 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6064 calls to add_thread.
6065 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6066 * server.c (handle_query): Use thread_to_gdb_id.
6067 (handle_v_cont, main): Use gdb_id_to_thread_id.
6068 * server.h (add_thread): Update prototype.
6069 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6070 prototypes.
6071
6072 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6073
6074 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6075 left-padded registers.
6076 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6077 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6078
6079 2005-07-01 Steve Ellcey <sje@cup.hp.com>
6080
6081 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6082 * configure: Regenerate.
6083 * config.in: Regenerate.
6084 * server.h (NEED_DECLARATION_STRERROR):
6085 Replace with !HAVE_DECL_STRERROR.
6086
6087 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6088
6089 * linux-low.c (linux_wait, linux_send_signal): Don't test
6090 an unsigned long variable for > 0 if it could be MAX_ULONG.
6091 * server.c (myresume): Likewise.
6092 * target.c (set_desired_inferior): Likewise.
6093
6094 2005-06-13 Mark Kettenis <kettenis@gnu.org>
6095
6096 * configure.ac: Simplify and improve check for socklen_t.
6097 * configure, config.in: Regenerate.
6098
6099 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6100
6101 * acconfig.h: Remove.
6102 * configure.ac: Add a test for socklen_t. Use three-argument
6103 AC_DEFINE throughout.
6104 * config.in: Regenerated using autoheader 2.59.
6105 * configure: Regenerated.
6106
6107 * gdbreplay.c (socklen_t): Provide a default.
6108 (remote_open): Use socklen_t.
6109 * remote-utils.c (socklen_t): Provide a default.
6110 (remote_open): Use socklen_t.
6111 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6112 unsigned char.
6113
6114 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6115 char for buffers.
6116 * linux-low.c (linux_read_memory, linux_write_memory)
6117 (linux_read_auxv): Likewise.
6118 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6119 (check_mem_write): Likewise.
6120 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6121 Likewise.
6122 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6123 (registers_from_string, register_data): Likewise.
6124 * server.c (handle_query, main): Likewise.
6125 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6126 (decode_M_packet): Likewise.
6127 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6128 * target.h (struct target_ops): Update read_memory, write_memory,
6129 and read_auxv.
6130 (read_inferior_memory, write_inferior_memory): Update.
6131 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6132 to unsigned char *.
6133 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6134 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6135 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6136 linux-s390-low.c, linux-sh-low.c: Update for changes in
6137 read_inferior_memory and the_low_target->breakpoint.
6138
6139 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6140
6141 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6142 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6143 * configure.srv: Add powerpc64-*-linux*.
6144 * linux-ppc64-low.c: New file.
6145
6146 2005-05-23 Orjan Friberg <orjanf@axis.com>
6147
6148 * linux-cris-low.c: New file with support for CRIS.
6149 * linux-crisv32-low.c: Ditto for CRISv32.
6150 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6151 (clean): Add reg-cris.c and reg-crisv32.c.
6152 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6153 reg-crisv32.o, and reg-crisv32.c to make rules.
6154 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6155 recognized targets.
6156
6157 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6158
6159 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6160 of sizeof (PTRACE_XFER_TYPE).
6161 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6162
6163 2005-05-12 Orjan Friberg <orjanf@axis.com>
6164
6165 * target.h (struct target_ops): Add insert_watchpoint,
6166 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6167 pointers for hardware watchpoint support.
6168 * linux-low.h (struct linux_target_ops): Ditto.
6169 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6170 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6171 to linux_target_ops.
6172 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6173 reply packet.
6174 * server.c (main): Recognize 'Z' and 'z' packets.
6175
6176 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6177
6178 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6179 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6180 (the_low_target): Add new members.
6181
6182 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6183
6184 * proc-service.c (ps_lgetregs): Search all_processes instead of
6185 all_threads.
6186
6187 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6188
6189 * server.c (start_inferior): Change return type to int.
6190 (attach_inferior): Change sigptr to int *.
6191 (handle_v_cont, handle_v_requests): Change signal to int *.
6192 (main): Change signal to int.
6193
6194 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6195
6196 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6197 * configure.srv: Add m32r*-*-linux*.
6198 * linux-m32r-low.c: New file.
6199
6200 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6201
6202 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6203
6204 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6205
6206 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6207 Take unsigned long arguments for PIDs.
6208 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6209 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6210 (wait_for_sigstop, linux_resume_one_process)
6211 (regsets_fetch_inferior_registers, linux_send_signal)
6212 (linux_read_auxv): Likewise. Update the types of variables holding
6213 PIDs. Update format string specifiers.
6214 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6215 * remote-utils.c (prepare_resume_reply): Likewise.
6216 * server.c (cont_thread, general_thread, step_thread)
6217 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6218 unsigned long.
6219 (handle_query): Update format specifiers.
6220 (handle_v_cont, main): Use strtoul for thread IDs.
6221 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6222 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6223 (general_thread, step_thread, thread_from_wait)
6224 (old_thread_from_wait): Update.
6225 * target.h (struct thread_resume): Use unsigned long for THREAD.
6226 (struct target_ops): Use unsigned long for arguments to attach and
6227 thread_alive.
6228
6229 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6230
6231 * acinclude.m4: Include bfd/bfd.m4 directly.
6232 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6233 <agriffis@toolchain.org>.
6234 * aclocal.m4, configure: Regenerated.
6235
6236 2005-01-07 Andrew Cagney <cagney@gnu.org>
6237
6238 * configure.ac: Rename configure.in, require autoconf 2.59.
6239 * configure: Re-generate.
6240
6241 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6242
6243 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6244 LIBS when finished.
6245 * aclocal.m4: Regenerated.
6246 * configure: Regenerated.
6247
6248 2004-11-21 Andreas Schwab <schwab@suse.de>
6249
6250 * linux-m68k-low.c (m68k_num_gregs): Define.
6251 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6252 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6253 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6254 (m68k_breakpoint_at): New. Add to the_low_target.
6255
6256 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6257 srv_linux_thread_db to yes.
6258
6259 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6260
6261 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6262 (ARCH_SET_FS): Likewise.
6263 (ARCH_GET_FS): Likewise.
6264 (ARCH_GET_GS): Likewise.
6265
6266 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6267
6268 * linux-i386-low.c (ps_get_thread_area): New.
6269 * linux-x86-64-low.c (ps_get_thread_area): New.
6270 * linux-low.c: Include <sys/syscall.h>.
6271 (linux_kill_one_process): Don't kill the first thread here.
6272 (linux_kill): Kill the first thread here.
6273 (kill_lwp): New function.
6274 (send_sigstop, linux_send_signal): Use it.
6275 * proc-service.c: Clean up #ifdefs.
6276 (fpregset_info): Delete.
6277 (ps_lgetregs): Update and enable implementation.
6278 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6279 implementations.
6280 * remote-utils.c (struct sym_cache, symbol_cache): New.
6281 (input_interrupt): Print a clearer message.
6282 (async_io_enabled): New variable.
6283 (enable_async_io, disable_async_io): Use it. Update comments.
6284 (look_up_one_symbol): Use the symbol cache.
6285 * thread-db.c (thread_db_look_up_symbols): New function.
6286 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6287
6288 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6289
6290 * configure.in: Test for -rdynamic.
6291 * configure: Regenerated.
6292 * Makefile (INTERNAL_LDFLAGS): New.
6293 (gdbserver, gdbreplay): Use it.
6294
6295 2004-09-02 Andrew Cagney <cagney@gnu.org>
6296
6297 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6298
6299 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6300
6301 * linux-low.c (linux_wait): Clear all_processes list also.
6302
6303 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6304
6305 * linux-low.c: Include <errno.h>. Remove extern declaration of
6306 errno.
6307
6308 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6309
6310 * gdbreplay.c, server.h, utils.c: Update copyright years.
6311
6312 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6313
6314 * server.c (main): Print child status or termination signal from
6315 variable 'signal', not 'sig'.
6316
6317 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6318
6319 * linux-low.c (linux_read_memory): Change return type to
6320 int. Check for and return error from ptrace().
6321 * target.c (read_inferior_memory): Change return type to int. Pass
6322 back return status from the_target->read_memory().
6323 * target.h (struct target_ops): Adapt *read_memory() prototype.
6324 Update comment.
6325 (read_inferior_memory): Adapt prototype.
6326 * server.c (main): Return an error packet if
6327 read_inferior_memory() returns an error.
6328
6329 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6330
6331 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6332 Unify with other clean targets.
6333
6334 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6335
6336 * server.c (handle_v_cont): Call set_desired_inferior.
6337
6338 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6339
6340 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6341
6342 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6343
6344 * linux-low.c (linux_wait): Unblock async I/O.
6345 (linux_resume): Block and enable async I/O.
6346 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6347 * server.h (block_async_io, unblock_async_io): Add prototypes.
6348
6349 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6350
6351 * remote-utils.c (remote_open): Print a status notice after
6352 opening a TCP port.
6353 * server.c (attach_inferior): Print a status notice after
6354 attaching.
6355
6356 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6357
6358 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6359
6360 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6361
6362 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6363 error packet.
6364 * server.c, target.h: Update copyright years.
6365
6366 2004-02-25 Roland McGrath <roland@redhat.com>
6367
6368 * target.h (struct target_ops): New member `read_auxv'.
6369 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6370 * linux-low.c (linux_read_auxv): New function.
6371 (linux_target_ops): Initialize `read_auxv' member to that.
6372
6373 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6374
6375 Committed by Jim Blandy <jimb@redhat.com>.
6376
6377 * linux-s390-low.c (s390_num_regs): Update.
6378 (s390_regmap): Remove control registers. Use __s390x__ predefine
6379 instead of GPR_SIZE to distiguish s390 and s390x targets.
6380
6381 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6382
6383 * linux-low.c: Update copyright year.
6384 (check_removed_breakpoint): Clear pending_is_breakpoint.
6385 (linux_set_resume_request, linux_queue_one_thread)
6386 (resume_status_pending_p): New functions.
6387 (linux_continue_one_thread): Use process->resume.
6388 (linux_resume): Only resume threads if there are no pending events.
6389 * linux-low.h (struct process_info): Add resume request
6390 pointer.
6391
6392 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6393
6394 * regcache.c (new_register_cache): Clear the allocated register
6395 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6396
6397 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6398
6399 * linux-low.c (linux_resume): Take a struct thread_resume *
6400 argument.
6401 (linux_wait): Update call.
6402 (resume_ptr): New static variable.
6403 (linux_continue_one_thread): Renamed from
6404 linux_continue_one_process. Use resume_ptr.
6405 (linux_resume): Use linux_continue_one_thread.
6406 * server.c (handle_v_cont, handle_v_requests): New functions.
6407 (myresume): New function.
6408 (main): Handle 'v' case.
6409 * target.h (struct thread_resume): New type.
6410 (struct target_ops): Change argument of "resume" to struct
6411 thread_resume *.
6412 (myresume): Delete macro.
6413
6414 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6415
6416 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6417 (uninstall): Support DESTDIR.
6418
6419 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6420
6421 * configure.srv: Add xscale*linux copy of arm*linux entry.
6422
6423 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6424
6425 * linux-arm-low.c (arm_reinsert_addr): New function.
6426 (the_low_target): Add arm_reinsert_addr.
6427
6428 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6429
6430 * mem-break.c: Remove whitespace at end of file.
6431
6432 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6433
6434 * configure.in: Check whether we need to prototype strerror.
6435 * server.h: Optionally prototype strerror.
6436 * gdbreplay.c (perror_with_name): Use strerror.
6437 * linux-low.c (linux_attach_lwp): Use strerror.
6438 * utils.c (perror_with_name): Use strerror.
6439 * config.in, configure: Regenerated.
6440
6441 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6442
6443 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6444 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6445
6446 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6447
6448 * Makefile.in (SFILES): Update.
6449 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6450 low-sun3.c: Remove files.
6451
6452 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6453
6454 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6455 (linux_detach_one_process, linux_detach): New functions.
6456 (linux_target_ops): Add linux_detach.
6457 * server.c (main): Handle 'D' packet.
6458 * target.h (struct target_ops): Add "detach" member.
6459 (detach_inferior): Define.
6460
6461 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6462
6463 From Kelley Cook <kelleycook@wideopenwest.com>:
6464 * configure.srv: Accept i[34567]86 variants.
6465
6466 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6467
6468 * linux-low.c (linux_wait_for_event): Correct comment typos.
6469 (linux_resume_one_process): Call check_removed_breakpoint.
6470 (linux_send_signal): New function.
6471 (linux_target_ops): Add linux_send_signal.
6472 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6473 of kill.
6474 * target.h (struct target_ops): Add send_signal.
6475
6476 2003-05-29 Jim Blandy <jimb@redhat.com>
6477
6478 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6479 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6480 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6481 away part of the register's value.
6482
6483 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6484
6485 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6486 (linux_wait_for_event, linux_init_signals): Likewise.
6487
6488 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6489
6490 * configure.in: Check for stdlib.h.
6491 * configure: Regenerated.
6492 * config.in: Regenerated.
6493
6494 2003-01-04 Andreas Schwab <schwab@suse.de>
6495
6496 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6497
6498 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6499
6500 * Makefile.in: Remove obsolete code.
6501
6502 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6503
6504 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6505 defined(PT_FPR0_HI).
6506
6507 2002-11-17 Stuart Hughes <seh@zee2.com>
6508
6509 * linux-arm-low.c (arm_num_regs): Increase.
6510 (arm_regmap): Include status register.
6511
6512 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6513
6514 * linux-low.c (register_addr): Remove incorrect -1 check.
6515
6516 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6517
6518 * linux-low.c (linux_create_inferior): Call setpgid. Return
6519 the new PID.
6520 (unstopped_p, linux_signal_pid): Remove.
6521 (linux_target_ops): Remove linux_signal_pid.
6522 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6523 global instead of target method.
6524 * target.h (struct target_ops): Remove signal_pid. Update comment
6525 for create_inferior.
6526 * server.c (signal_pid): New variable.
6527 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6528 gdbserver. Set the child to be the foreground process group.
6529 (attach_inferior): Set signal_pid.
6530
6531 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6532
6533 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6534
6535 2002-08-20 Jim Blandy <jimb@redhat.com>
6536
6537 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6538 default for this.
6539
6540 2002-08-01 Andrew Cagney <cagney@redhat.com>
6541
6542 * Makefile.in: Make chill references obsolete.
6543
6544 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6545
6546 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6547 * configure: Regenerate.
6548 * config.in: Regenerate.
6549
6550 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6551
6552 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6553 (perror_with_name, remote_close, remote_open, expect, play): Static.
6554
6555 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6556
6557 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6558 byte offsets instead of an array of indexes.
6559 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6560
6561 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6562
6563 * regcache.c: Add comment.
6564
6565 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6566
6567 * thread-db.c: New file.
6568 * proc-service.c: New file.
6569 * acinclude.m4: New file.
6570 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6571 proc-service.o, and thread-db.o.
6572 (linux-low.o): Add USE_THREAD_DB.
6573 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6574 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6575 * aclocal.m4: Regenerated.
6576 * config.in: Regenerated.
6577 * configure: Regenerated.
6578 * configure.in: Check for proc_service.h, sys/procfs.h,
6579 thread_db.h, and linux/elf.h headrs.
6580 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6581 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6582 Check for -lthread_db and thread support.
6583 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6584 PowerPC, and SuperH.
6585 * i387-fp.c: Constify arguments.
6586 * i387-fp.h: Likewise.
6587 * inferiors.c: (struct thread_info): Renamed from
6588 `struct inferior_info'. Remove PID member. Use generic inferior
6589 list header. All uses updated.
6590 (inferiors, signal_pid): Removed.
6591 (all_threads): New variable.
6592 (get_thread): Define.
6593 (add_inferior_to_list): New function.
6594 (for_each_inferior): New function.
6595 (change_inferior_id): New function.
6596 (add_inferior): Removed.
6597 (remove_inferior): New function.
6598 (add_thread): New function.
6599 (free_one_thread): New function.
6600 (remove_thread): New function.
6601 (clear_inferiors): Use for_each_inferior and free_one_thread.
6602 (find_inferior): New function.
6603 (find_inferior_id): New function.
6604 (inferior_target_data): Update argument type.
6605 (set_inferior_target_data): Likewise.
6606 (inferior_regcache_data): Likewise.
6607 (set_inferior_regcache_data): Likewise.
6608 * linux-low.c (linux_bp_reinsert): Remove.
6609 (all_processes, stopping_threads, using_thrads)
6610 (struct pending_signals, debug_threads, pid_of): New.
6611 (inferior_pid): Replace with macro.
6612 (struct inferior_linux_data): Remove.
6613 (get_stop_pc, add_process): New functions.
6614 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6615 Use add_process and add_thread.
6616 (linux_attach_lwp): New function, based on old linux_attach. Use
6617 add_process and add_thread. Set stop_expected for new threads.
6618 (linux_attach): New function.
6619 (linux_kill_one_process): New function.
6620 (linux_kill): Kill all LWPs.
6621 (linux_thread_alive): Use find_inferior_id.
6622 (check_removed_breakpoints, status_pending_p): New functions.
6623 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6624 Update. Use WNOHANG. Wait for cloned processes also. Update process
6625 struct for the found process.
6626 (linux_wait_for_event): New function.
6627 (linux_wait): Use it. Support LWPs.
6628 (send_sigstop, wait_for_sigstop, stop_all_processes)
6629 (linux_resume_one_process, linux_continue_one_process): New functions.
6630 (linux_resume): Support LWPs.
6631 (REGISTER_RAW_SIZE): Remove.
6632 (fetch_register): Use register_size instead. Call supply_register.
6633 (usr_store_inferior_registers): Likewise. Call collect_register.
6634 Fix recursive case.
6635 (regsets_fetch_inferior_registers): Improve error message.
6636 (regsets_store_inferior_registers): Add debugging.
6637 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6638 (unstopped_p, linux_signal_pid): New functions.
6639 (linux_target_ops): Add linux_signal_pid.
6640 (linux_init_signals): New function.
6641 (initialize_low): Call it. Initialize using_threads.
6642 * regcache.c (inferior_regcache_data): Add valid
6643 flag.
6644 (get_regcache): Fetch registers lazily. Add fetch argument
6645 and update all callers.
6646 (regcache_invalidate_one, regcache_invalidate): New
6647 functions.
6648 (new_register_cache): Renamed from create_register_cache.
6649 Return the new regcache.
6650 (free_register_cache): Change argument to a void *.
6651 (registers_to_string, registers_from_string): Call get_regcache
6652 with fetch flag set.
6653 (register_data): Make static. Pass fetch flag to get_regcache.
6654 (supply_register): Call get_regcache with fetch flag clear.
6655 (collect_register): Call get_regcache with fetch flag set.
6656 (collect_register_as_string): New function.
6657 * regcache.h: Update.
6658 * remote-utils.c (putpkt): Flush after debug output and use
6659 stderr.
6660 Handle input interrupts while waiting for an ACK.
6661 (input_interrupt): Use signal_pid method.
6662 (getpkt): Flush after debug output and use stderr.
6663 (outreg): Use collect_register_as_string.
6664 (new_thread_notify, dead_thread_notify): New functions.
6665 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6666 and general_thread.
6667 (look_up_one_symbol): Flush after debug output.
6668 * server.c (step_thread, server_waiting): New variables.
6669 (start_inferior): Don't use signal_pid. Update call to mywait.
6670 (attach_inferior): Update call to mywait.
6671 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6672 (main): Don't fetch/store registers explicitly. Use
6673 set_desired_inferior. Support proposed ``Hs'' packet. Update
6674 calls to mywait.
6675 * server.h: Update.
6676 (struct inferior_list, struct_inferior_list_entry): New.
6677 * target.c (set_desired_inferior): New.
6678 (write_inferior_memory): Constify.
6679 (mywait): New function.
6680 * target.h: Update.
6681 (struct target_ops): New signal_pid method.
6682 (mywait): Removed macro, added prototype.
6683
6684 * linux-low.h (regset_func): Removed.
6685 (regset_fill_func, regset_store_func): New.
6686 (enum regset_type): New.
6687 (struct regset_info): Add type field. Use new operation types.
6688 (struct linux_target_ops): stop_pc renamed to get_pc.
6689 Add decr_pc_after_break and breakpoint_at.
6690 (get_process, get_thread_proess, get_process_thread)
6691 (strut process_info, all_processes, linux_attach_lwp)
6692 (thread_db_init): New.
6693
6694 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6695 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6696 (the_low_target): Add new members.
6697 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6698 (i386_store_fpxregset): Constify.
6699 (target_regsets): Add new kind identifier.
6700 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6701 (i386_set_pc): Add debugging.
6702 (i386_breakpoint_at): New function.
6703 (the_low_target): Add new members.
6704 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6705 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6706 (mips_breakpoint_at): New.
6707 (the_low_target): Add new members.
6708 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6709 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6710 (the_low_target): Add new members.
6711 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6712 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6713 (the_low_target): Add new members.
6714 * linux-x86-64-low.c (target_regsets): Add new kind
6715 identifier.
6716
6717 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6718
6719 From Martin Pool <mbp@samba.org>:
6720 * server.c (gdbserver_usage): New function.
6721 (main): Call it.
6722
6723 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6724
6725 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6726 stop_at -> stop_pc.
6727
6728 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6729
6730 * Makefile.in: Remove obsolete code.
6731
6732 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6733
6734 * linux-low.c (regsets_fetch_inferior_registers),
6735 (regsets_store_inferior_registers): Removed cast to int from
6736 ptrace() calls.
6737 * regcache.h: Added declaration of struct inferior_info.
6738
6739 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6740
6741 * inferiors.c (struct inferior_info): Add regcache_data.
6742 (add_inferior): Call create_register_cache.
6743 (clear_inferiors): Call free_register_cache.
6744 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6745 * regcache.c (struct inferior_regcache_data): New.
6746 (registers): Remove.
6747 (get_regcache): New function.
6748 (create_register_cache, free_register_cache): New functions.
6749 (set_register_cache): Don't initialize the register cache here.
6750 (registers_to_string, registers_from_string, register_data): Call
6751 get_regcache.
6752 * regcache.h: Add prototypes.
6753 * server.h: Likewise.
6754
6755 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6756
6757 * mem-break.c: New file.
6758 * mem-break.h: New file.
6759 * Makefile.in: Add mem-break.o rule; update server.h
6760 dependencies.
6761 * inferiors.c (struct inferior_info): Add target_data
6762 member.
6763 (clear_inferiors): Free target_data member if set.
6764 (inferior_target_data, set_inferior_target_data): New functions.
6765 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6766 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6767 * linux-low.c (linux_bp_reinsert): New variable.
6768 (struct inferior_linux_data): New.
6769 (linux_create_inferior): Use set_inferior_target_data.
6770 (linux_attach): Likewise. Call add_inferior.
6771 (linux_wait_for_one_inferior): New function.
6772 (linux_wait): Call it.
6773 (linux_write_memory): Add const.
6774 (initialize_low): Call set_breakpoint_data.
6775 * linux-low.h (struct linux_target_ops): Add breakpoint
6776 handling members.
6777 * server.c (attach_inferior): Remove extra add_inferior
6778 call.
6779 * server.h: Include mem-break.h. Update inferior.c
6780 prototypes.
6781 * target.c (read_inferior_memory)
6782 (write_inferior_memory): New functions.
6783 * target.h (read_inferior_memory)
6784 (write_inferior_memory): Change macros to prototypes.
6785 (struct target_ops): Update comments. Add const to write_memory
6786 definition.
6787
6788 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6789
6790 * linux-low.c (usr_store_inferior_registers): Support
6791 registers which are allowed to fail to store.
6792 * linux-low.h (linux_target_ops): Likewise.
6793 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6794 (ppc_cannot_store_register): FPSCR may not be storable.
6795
6796 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6797
6798 * server.h: Include <string.h> if HAVE_STRING_H.
6799 * ChangeLog: Correct paths in last ChangeLog entry.
6800
6801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6802
6803 * linux-low.h: Remove obsolete prototypes.
6804 (struct linux_target_ops): New.
6805 (extern the_low_target): New.
6806 * linux-low.c (num_regs, regmap): Remove declarations.
6807 (register_addr): Use the_low_target explicitly.
6808 (fetch_register): Likewise.
6809 (usr_fetch_inferior_registers): Likewise.
6810 (usr_store_inferior_registers): Likewise.
6811 * linux-arm-low.c (num_regs): Remove.
6812 (arm_num_regs): Define.
6813 (arm_regmap): Renamed from regmap, made static.
6814 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6815 made static.
6816 (arm_cannot_store_register): Renamed from cannot_store_register,
6817 made static.
6818 (the_low_target): New.
6819 * linux-i386-low.c (num_regs): Remove.
6820 (i386_num_regs): Define.
6821 (i386_regmap): Renamed from regmap, made static.
6822 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6823 made static.
6824 (i386_cannot_store_register): Renamed from cannot_store_register,
6825 made static.
6826 (the_low_target): New.
6827 * linux-ia64-low.c (num_regs): Remove.
6828 (ia64_num_regs): Define.
6829 (ia64_regmap): Renamed from regmap, made static.
6830 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6831 made static.
6832 (ia64_cannot_store_register): Renamed from cannot_store_register,
6833 made static.
6834 (the_low_target): New.
6835 * linux-m68k-low.c (num_regs): Remove.
6836 (m68k_num_regs): Define.
6837 (m68k_regmap): Renamed from regmap, made static.
6838 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6839 made static.
6840 (m68k_cannot_store_register): Renamed from cannot_store_register,
6841 made static.
6842 (the_low_target): New.
6843 * linux-mips-low.c (num_regs): Remove.
6844 (mips_num_regs): Define.
6845 (mips_regmap): Renamed from regmap, made static.
6846 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6847 made static.
6848 (mips_cannot_store_register): Renamed from cannot_store_register,
6849 made static.
6850 (the_low_target): New.
6851 * linux-ppc-low.c (num_regs): Remove.
6852 (ppc_num_regs): Define.
6853 (ppc_regmap): Renamed from regmap, made static.
6854 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6855 made static.
6856 (ppc_cannot_store_register): Renamed from cannot_store_register,
6857 made static.
6858 (the_low_target): New.
6859 * linux-s390-low.c (num_regs): Remove.
6860 (s390_num_regs): Define.
6861 (s390_regmap): Renamed from regmap, made static.
6862 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6863 made static.
6864 (s390_cannot_store_register): Renamed from cannot_store_register,
6865 made static.
6866 (the_low_target): New.
6867 * linux-sh-low.c (num_regs): Remove.
6868 (sh_num_regs): Define.
6869 (sh_regmap): Renamed from regmap, made static.
6870 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6871 made static.
6872 (sh_cannot_store_register): Renamed from cannot_store_register,
6873 made static.
6874 (the_low_target): New.
6875 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6876 (the_low_target): New.
6877
6878 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6879
6880 * Makefile.in: Add stamp-h target.
6881 * configure.in: Create stamp-h.
6882 * configure: Regenerated.
6883
6884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6885
6886 * inferiors.c: New file.
6887 * target.c: New file.
6888 * target.h: New file.
6889 * Makefile.in: Add target.o and inferiors.o. Update
6890 dependencies.
6891 * linux-low.c (inferior_pid): New static variable,
6892 moved from server.c.
6893 (linux_create_inferior): Renamed from create_inferior.
6894 Call add_inferior. Return 0 on success instead of a PID.
6895 (linux_attach): Renamed from myattach.
6896 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6897 (linux_thread_alive): Renamed from mythread_alive.
6898 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6899 child dies.
6900 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6901 (regsets_store_inferior_registers): Correct error message.
6902 Add missing ``return 0''.
6903 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6904 (linux_store_registers): Renamed from store_inferior_registers.
6905 (linux_read_memory): Renamed from read_inferior_memory.
6906 (linux_write_memory): Renamed from write_inferior_memory.
6907 (linux_target_ops): New structure.
6908 (initialize_low): Call set_target_ops ().
6909 * remote-utils.c (unhexify): New function.
6910 (hexify): New function.
6911 (input_interrupt): Send signals to ``signal_pid''.
6912 * server.c (inferior_pid): Remove.
6913 (start_inferior): Update create_inferior call.
6914 (attach_inferior): Call add_inferior.
6915 (handle_query): New function.
6916 (main): Call handle_query for `q' packets.
6917 * server.h: Include "target.h". Remove obsolete prototypes.
6918 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6919
6920 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6921
6922 * Makefile.in: Add WARN_CFLAGS. Update configury
6923 dependencies.
6924 * configure.in: Check for <string.h>
6925 * configure: Regenerate.
6926 * config.in: Regenerate.
6927 * gdbreplay.c: Include needed system headers.
6928 (remote_open): Remove strchr prototype.
6929 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6930 * regcache.c (supply_register): Change buf argument to const void *.
6931 (supply_register_by_name): Likewise.
6932 (collect_register): Change buf argument to void *.
6933 (collect_register_by_name): Likewise.
6934 * regcache.h: Add missing prototypes.
6935 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6936 * server.c (handle_query): New function.
6937 (attached): New static variable, moved out of main.
6938 (main): Quiet longjmp clobber warnings.
6939 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6940 * utils.c (error): Remove NORETURN.
6941 (fatal): Likewise.
This page took 0.190082 seconds and 4 git commands to generate.