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