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