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