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