[PowerPC] Disable regsets using zero sizes in gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7273b5fc
PFC
12018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2
3 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4 (ppc_store_vsxregset): Likewise.
5 (ppc_fill_vrregset): Likewise.
6 (ppc_store_vrregset): Likewise.
7 (ppc_fill_evrregset): Likewise.
8 (ppc_store_evrregset): Likewise.
9 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
10 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
11 needed.
12
2e077f5e
PFC
132018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
14
15 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
16 wordsize of the inferior. Call ppc_linux_target_wordsize.
17
bd64614e
PFC
182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
19
20 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
21 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
22 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
23 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
24 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
25 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
26 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
27 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
28 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
29 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
30 (tdesc_powerpc_e500l): Remove.
31 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
32 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
33 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
34 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
35 linux-ppc-tdesc.h.
36 (ppc_arch_setup): Remove target description matching code. Fill a
37 ppc_linux_features struct and call ppc_linux_match_description
38 with it.
39
75d74cca
MR
402018-05-22 Maciej W. Rozycki <macro@mips.com>
41
42 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
43 width of the requested register exceeds the width of the
44 `ptrace' data type.
45 (mips_cannot_store_register): Likewise.
46
e4439e43
MR
472018-05-21 Maciej W. Rozycki <macro@mips.com>
48
49 * linux-mips-low.c (mips_fetch_register): New function. Update
50 preceding comment.
51 (mips_store_gregset): Supply 0 rather than $restart for $zero.
52 (the_low_target): Wire `mips_fetch_register'.
53
55271bf9
JB
542018-05-10 Joel Brobecker <brobecker@adacore.com>
55
56 * lynx-i386-low.c (LYNXOS_178): New macro.
57 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
58 the layout on LynxOS-178.
59 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
60 handle floating point registers that are not supported by
61 LynxOS-178.
62
1a34f210
TT
632018-05-10 Tom Tromey <tom@tromey.com>
64
65 * configure: Rebuild.
66
190852c8
JB
672018-05-10 Joel Brobecker <brobecker@adacore.com>
68
69 PR server/23158:
70 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
71 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
72 Use it to set the expedite_regs field in the given tdesc.
73 * x86-tdesc.h: New file.
74 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
75 Adjust following the addition of the new expedite_regs parameter
76 to init_target_desc.
77 * linux-tic6x-low.c (tic6x_read_description): Likewise.
78 * linux-x86-tdesc.c: #include "x86-tdesc.h".
79 (i386_linux_read_description, amd64_linux_read_description):
80 Adjust following the addition of the new expedite_regs parameter
81 to init_target_desc.
82 * lynx-i386-low.c: #include "x86-tdesc.h".
83 (lynx_i386_arch_setup): Adjust following the addition of the new
84 expedite_regs parameter to init_target_desc.
85 * nto-x86-low.c: #include "x86-tdesc.h".
86 (nto_x86_arch_setup): Adjust following the addition of the new
87 expedite_regs parameter to init_target_desc.
88 * win32-i386-low.c: #include "x86-tdesc.h".
89 (i386_arch_setup): Adjust following the addition of the new
90 expedite_regs parameter to init_target_desc.
91
7dbac825
JB
922018-05-10 Joel Brobecker <brobecker@adacore.com>
93
94 PR server/23158:
95 * win32-low.c (win32_create_inferior): Add call to my_wait
96 setting last_status global.
97
906994d9
JB
982018-05-10 Joel Brobecker <brobecker@adacore.com>
99
100 PR server/23158:
101 * win32-low.c (create_process): Only call gdb_tilde_expand if
102 inferior_cwd is not NULL.
103
8ee22052
AB
1042018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
105
106 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
107 registers to the cache if their values have changed.
108 (i387_xsave_to_cache): Provide default values for x87 control
109 registers when these features are available, but disabled.
110 * regcache.c (supply_register_by_name_zeroed): New function.
111 * regcache.h (supply_register_by_name_zeroed): Declare new
112 function.
113
aff689d3
TT
1142018-05-07 Tom Tromey <tom@tromey.com>
115
116 * configure: Rebuild.
117
85e26832
TT
1182018-05-04 Tom Tromey <tom@tromey.com>
119
120 * configure: Rebuild.
121
a3b60e45
JK
1222018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
123 Pedro Alves <palves@redhat.com>
124
125 * linux-aarch64-low.c (aarch64_stopped_data_address):
126 Likewise.
127
632e107b
TT
1282018-04-27 Tom Tromey <tom@tromey.com>
129
130 * configure: Rebuild.
131
458412c3
TT
1322018-04-23 Tom Tromey <tom@tromey.com>
133
134 * configure: Rebuild.
135
f31c089e
SM
1362018-04-19 Simon Marchi <simon.marchi@ericsson.com>
137
138 * Makefile.in (depcomp): Add "..".
139 (all_deps_files): New and use it.
140
b319b098
AH
1412018-04-18 Alan Hayward <alan.hayward@arm.com>
142
143 * configure.srv (aarch64*-*-linux*): Don't include xml.
144 (i[34567]86-*-cygwin*): Likewise.
145 (i[34567]86-*-linux*): Likewise.
146 (i[34567]86-*-lynxos*): Likewise.
147 (i[34567]86-*-mingw32ce*): Likewise.
148 (i[34567]86-*-mingw*): Likewise.
149 (i[34567]86-*-nto*): Likewise.
150 (tic6x-*-uclinux): Likewise.
151 (x86_64-*-linux*): Likewise.
152 (x86_64-*-mingw*): Likewise.
153 (x86_64-*-cygwin*): Likewise.
154
3b74854b
AH
1552018-04-18 Alan Hayward <alan.hayward@arm.com>
156
157 * tdesc.c: Remove xml parameter.
158
e98577a9
AH
1592018-04-18 Alan Hayward <alan.hayward@arm.com>
160
161 * server.c (get_features_xml): Remove cast.
162 * tdesc.c (void target_desc::accept): Fill in function.
163 (tdesc_get_features_xml): Remove old xml creation.
164 (print_xml_feature::visit_pre): Add xml vistor.
165 * tdesc.h (struct target_desc): Make xmltarget mutable.
166 (tdesc_get_features_xml): Remove declaration.
167
d278f585
AH
1682018-04-18 Alan Hayward <alan.hayward@arm.com>
169
170 * tdesc.c (tdesc_architecture_name): Add new function.
171 (tdesc_osabi_name): Likewise.
172 (tdesc_get_features_xml): Use new functions.
173
eee8a18d
AH
1742018-04-18 Alan Hayward <alan.hayward@arm.com>
175
176 * tdesc.c (tdesc_create_flags): Remove.
177 (tdesc_add_flag): Likewise.
178 (tdesc_named_type): Likewise.
179 (tdesc_create_union): Likewise.
180 (tdesc_create_struct): Likewise.
181 (tdesc_create_vector): Likewise.
182 (tdesc_add_bitfield): Likewise.
183 (tdesc_add_field): Likewise.
184 (tdesc_set_struct_size): Likewise.
185
82ec9bc7
AH
1862018-04-18 Alan Hayward <alan.hayward@arm.com>
187
188 * tdesc.c (~target_desc): Remove implictly deleted items.
189 (init_target_desc): Iterate all features.
190 (tdesc_get_features_xml): Use vector.
191 (tdesc_create_feature): Create feature.
192 * tdesc.h (tdesc_feature) Remove
193 (target_desc): Add features.
194
ea3e7d71
AH
1952018-04-18 Alan Hayward <alan.hayward@arm.com>
196
197 * Makefile.in: Add common/tdesc.c
198 * tdesc.c (init_target_desc): init all reg_defs from register
199 vector.
200 (tdesc_create_reg): Create tdesc_reg.
201 * tdesc.h (tdesc_feature): Add register vector.
202
17d08cd4
SM
2032018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * tdesc.h (struct target_desc) <features>: Change type to
206 std::vector<std::string>.
207 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
208 changes.
209 (tdesc_get_features_xml): Likewise.
210 (tdesc_create_feature): Likewise.
211
5cd3e386
AH
2122018-03-26 Alan Hayward <alan.hayward@arm.com>
213
214 * regcache.c (find_register_by_number): Return a ref.
215 (find_regno): Use references.
216 (register_size): Likewise.
217 (register_data): Likewise.
218 * tdesc.c (target_desc::~target_desc): Remove free calls.
219 (target_desc::operator==): Use std::vector compare.
220 (init_target_desc): Use reference.
221 (tdesc_create_reg): Use reg constructors.
222 * tdesc.h (struct target_desc): Replace pointer with object.
223
dff7492c
AH
2242018-03-23 Alan Hayward <alan.hayward@arm.com>
225
226 * regcache.c (find_register_by_number): Make static.
227 (find_regno): Use find_register_by_number
228 * regcache.h (struct reg): Remove declaration.
229
d80e5242
AH
2302018-03-23 Alan Hayward <alan.hayward@arm.com>
231
232 * tdesc.c (target_desc::~target_desc): Move to here.
233 (target_desc::operator==): Likewise.
234 * tdesc.h (target_desc::~target_desc): Move from here.
235 (target_desc::operator==): Likewise.
236
f69c5afb
AA
2372018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
238
239 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
240
ce29f843
AA
2412018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
242
243 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
244 S390_TDESC_GS.
245 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
246 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
247 and init_registers_s390_gs_linux64.
248
c49bd90b
AA
2492018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
250
251 * linux-s390-low.c (s390_fill_gs): Remove function.
252 (s390_fill_gsbc): Remove function.
253 (s390_regsets): Set fill functions for the guarded storage regsets
254 to NULL.
255
7edb9bd3
AA
2562018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
257
258 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
259 the word size. Add comment.
260 (s390_get_wordsize): New function.
261 (s390_arch_setup): No longer select a temporary tdesc to fetch the
262 pswm with it. Instead, use s390_get_wordsize to determine the
263 word size first and derive the correct tdesc from that directly.
264
39be3c7e
SM
2652018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
266
267 * Makefile.in: Include silent-rules.mk.
268 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
269 (COMPILE): Add ECHO_CXX.
270 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
271 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
272 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
273 (version-generated.c): Add ECHO_GEN.
274 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
275 (IPAGENT_COMPILE): Add ECHO_CXX.
276 (%-generated.c): Add ECHO_REGDAT.
277
3ae9ce5d
TT
2782018-03-14 Tom Tromey <tom@tromey.com>
279
280 PR cli/14977:
281 * ax.c (ax_printf): Special case for NULL.
282
e6a58aa8
SM
2832018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
284
285 * linux-low.c (linux_qxfer_libraries_svr4): Use
286 xml_escape_text_append.
287
f6e8a41e
SM
2882018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
291
b9671caf
SM
2922018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
293
294 * server.c (handle_general_set): Remove unnecessary xstrdup.
295
e80aaf61
SM
2962018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * server.c (parse_debug_format_options): Adjust to
299 delim_string_to_char_ptr_vec changes.
300 * thread-db.c (thread_db_load_search): Adjust to
301 dirnames_to_char_ptr_vec changes.
302
b1223e78
MM
3032018-03-01 Markus Metzger <markus.t.metzger@intel.com>
304
305 * target.h (target_enable_btrace, target_disable_btrace)
306 (target_read_btrace, target_read_btrace_conf): Turn macro into
307 inline function. Throw error if target method is not defined.
308 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
309 check for btrace target method. Be prepared to handle exceptions
310 from btrace target methods.
311
81561546
SDJ
3122018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
313
314 * server.c (captured_main): Change order of error message printed
315 when the current working directory cannot be found.
316
25e3c82c
SDJ
3172018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
318
319 * server.c: Include "filenames.h" and "pathstuff.h".
320 (program_name): Delete variable.
321 (program_path): New anonymous class.
322 (get_exec_wrapper): Use "program_path" instead of
323 "program_name".
324 (handle_v_run): Likewise.
325 (captured_main): Likewise.
326 (process_serial_event): Likewise.
327
b4987c95
SDJ
3282018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
329
330 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
331 (OBJS): Add "pathstuff.o".
332 * server.c (current_directory): New global variable.
333 (captured_main): Initialize "current_directory".
334
f46cd62a
AH
3352018-02-26 Alan Hayward <alan.hayward@arm.com>
336
337 * tdesc.c: Use common/tdesc.h.
338 * tdesc.h: Likewise.
339
a543c5ca
AH
3402018-02-20 Alan Hayward <alan.hayward@arm.com>
341 Simon Marchi <simon.marchi@ericsson.com>
342
343 * Makefile.in: Switch order of make rules.
344
b5884fa7
AH
3452018-02-19 Alan Hayward <alan.hayward@arm.com>
346
347 * Makefile.in: Add common directory in build.
348 * configure.ac: Add common reference.
349 * configure: Regenerate.
350
de6242d3
MM
3512018-02-09 Markus Metzger <markus.t.metzger@intel.com>
352
353 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
354 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
355 * spu-low.c (spu_target_ops): Likewise.
356 * win32-low.c (win32_target_ops): Likewise.
357 * server.c (supported_btrace_packets): Report packets unconditionally.
358 * target.h (target_ops) <supports_btrace>: Remove.
359 (target_supports_btrace): Remove.
360
9ee23a85
MM
3612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
362
363 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
364 (handle_btrace_disable): Change return type to void. Use exceptions
365 to report errors.
366 (handle_btrace_general_set): Catch exception and copy message to
367 return message.
368
8ce47547
TT
3692018-02-08 Tom Tromey <tom@tromey.com>
370
371 * linux-low.c (install_software_single_step_breakpoints): Use
372 make_scoped_restore.
373 * inferiors.c (make_cleanup_restore_current_thread): Remove.
374 (do_restore_current_thread_cleanup): Remove.
375 * gdbthread.h (make_cleanup_restore_current_thread): Don't
376 declare.
377
45dd3607
TT
3782018-02-08 Tom Tromey <tom@tromey.com>
379
380 * mem-break.c (set_raw_breakpoint_at): Use
381 gdb::unique_xmalloc_ptr.
382
e671cd59
PA
3832018-01-30 Pedro Alves <palves@redhat.com>
384
385 PR gdb/13211
386 * target.c (target_terminal::terminal_state): Rename to ...
387 (target_terminal::m_terminal_state): ... this.
388
a0aad537
JC
3892018-01-19 James Clarke <jrtc27@jrtc27.com>
390
391 * linux-low.c (handle_extended_wait): Surround call to
392 thread_db_notice_clone with #ifdef USE_THREAD_DB.
393
4d9b86e1
SM
3942018-01-17 Simon Marchi <simon.marchi@ericsson.com>
395
396 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
397 linux_ptrace_attach_fail_reason_string now returning an
398 std::string.
399 (linux_attach): Likewise.
400 * thread-db.c (attach_thread): Likewise.
401
f517c180
EA
4022018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
403
404 PR gdb/21559
405 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
406 checking for fs_base/gs_base fields in struct user_regs_struct.
407 * configure: Regenerate.
408
9a70f35c
YQ
4092018-01-16 Yao Qi <yao.qi@linaro.org>
410
411 PR gdb/18749
412 * linux-low.c (fetch_register): Call supply_register instead of
413 error.
414
605fd3c6
YQ
4152018-01-08 Yao Qi <yao.qi@linaro.org>
416 Simon Marchi <simon.marchi@ericsson.com>
417
418 * Makefile.in (OBS): Remove selftest.o.
419 * configure.ac: Set srv_selftest_objs if $development is true.
420 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
421 * configure: Re-generated.
422 * server.c (captured_main): Wrap variable selftest_filter with
423 GDB_SELF_TEST.
424
2cc05030
SM
4252018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
426
427 * server.c (parse_debug_format_options): Return std::string.
428 (handle_monitor_command, captured_main): Adjust.
429
e379cee6
PA
4302018-01-05 Pedro Alves <palves@redhat.com>
431
432 PR gdb/18653
433 * server.c (captured_main): Pass quiet=false to
434 save_original_signals_state.
435
82e1e79a
JB
4362018-01-01 Joel Brobecker <brobecker@adacore.com>
437
438 * gdbreplay.c (gdbreplay_version): Update copyright year in
439 version message.
440 * server.c (gdbserver_version): Likewise.
441
8e481c3b
TT
4422017-12-08 Tom Tromey <tom@tromey.com>
443
444 * ax.c (ax_printf): Update.
445
a8806230
YQ
4462017-12-07 Yao Qi <yao.qi@linaro.org>
447
448 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
449 aarch64_linux_read_description.
450 * linux-amd64-ipa.c (idx2mask): New array.
451 (get_ipa_tdesc): Move idx2mask out.
452 (initialize_low_tracepoint): Initialize target descriptions.
453 * linux-i386-ipa.c (idx2mask): New array.
454 (get_ipa_tdesc): Move idx2mask out.
455 (initialize_low_tracepoint): Initialize target descriptions.
456
d4a0e8b5
SM
4572017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * tdesc.c (struct tdesc_type): Change return type.
460 (tdesc_add_flag): Change parameter type.
461 (tdesc_add_bitfield): Likewise.
462 (tdesc_add_field): Likewise.
463 (tdesc_set_struct_size): Likewise.
464
798a7429
SM
4652017-12-05 Simon Marchi <simon.marchi@ericsson.com>
466
467 * regcache.c (registers_to_string): Remove unused variable.
468
c0e15c9b
SM
4692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * inferiors.c (for_each_inferior_with_data): Remove.
472 * inferiors.h (for_each_inferior_with_data): Remove.
473 * server.c (handle_qxfer_threads_worker): Change parameter type.
474 (handle_qxfer_threads_proper): Use for_each_thread.
475
f0045347
SM
4762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * inferiors.c (for_each_inferior): Remove.
479 (clear_inferiors): Use for_each_thread.
480 * inferiors.h (for_each_inferior): Remove.
481 * linux-low.c (linux_wait_for_event_filtered): Use
482 for_each_thread.
483 (linux_stabilize_threads): Likewise.
484 * regcache.c (regcache_release): Likewise.
485 * server.c (gdb_wants_all_threads_stopped): Likewise.
486 (clear_pending_status_callback): Remove.
487 (handle_status): Use for_each_thread.
488 (captured_main): Likewise.
489 * win32-low.c (child_init_thread_list): Likewise.
490 (win32_clear_inferiors): Likewise.
491 (fake_breakpoint_event): Likewise.
492
9521758b
SM
4932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
494
495 * inferiors.h (find_inferior): Remove.
496 * inferiors.c (find_inferior): Remove.
497
8f86d7aa
SM
4982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
499
500 * linux-low.c (resume_status_pending_p): Update comment.
501 (need_step_over_p): Update comment.
502
e2b44075
SM
5032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
504
505 * linux-low.c (proceed_one_lwp): Return void, change parameter
506 type.
507 (unsuspend_and_proceed_one_lwp): Likewise.
508 (proceed_all_lwps): Use for_each_thread.
509 (unstop_all_lwps): Likewise.
510
c80825ff
SM
5112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
512
513 * linux-low.c (linux_resume_one_thread): Return void, take
514 parameter directly.
515 (linux_resume): Use for_each_thread.
516
df3e4dbe
SM
5172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
518
519 * linux-low.c (send_sigstop_callback): Return void, change
520 parameter type. Rename to...
521 (send_sigstop): ... this.
522 (suspend_and_send_sigstop_callback): Return void, change parameter
523 type. Rename to...
524 (suspend_and_send_sigstop): ... this.
525 (stop_all_lwps): Use for_each_thread.
526
5a6b0a41
SM
5272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * linux-low.c (lwp_running): Return bool, remove unused
530 argument.
531 (linux_stabilize_threads): Use find_thread.
532
39a64da5
SM
5332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
534
535 * linux-low.c (select_singlestep_lwp_callback): Remove.
536 (count_events_callback): Remove.
537 (select_event_lwp_callback): Remove.
538 (select_event_lwp): Use find_thread/for_each_thread.
539
a1385b7b
SM
5402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * linux-low.c (not_stopped_callback): Return bool, take filter
543 argument directly.
544 (linux_wait_for_event_filtered): Use find_thread.
545 (linux_wait_1): Likewise.
546
454296a2
SM
5472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
548
549 * linux-low.c (same_lwp): Remove.
550 (find_lwp_pid): Use find_thread.
551
6b2a85da
SM
5522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * linux-low.c (delete_lwp_callback): Remove.
555 (linux_mourn): Use for_each_thread.
556
798a38e8
SM
5572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
558
559 * linux-low.c (linux_detach_lwp_callback): Return void, remove
560 args parameter, don't check for pid.
561 (linux_detach): Use for_each_thread.
562
e4eb0dec
SM
5632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * linux-low.c (struct counter): Remove.
566 (second_thread_of_pid_p): Remove.
567 (last_thread_of_process_p): Use find_thread.
568
83e1b6c1
SM
5692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
570
571 * inferiors.c (find_inferior_in_random): Remove.
572 * inferiors.h (find_inferior_in_random): Remove.
573 * linux-low.c (status_pending_p_callback): Return bool, accept
574 parameter ptid directly.
575 (linux_wait_for_event_filtered): Use find_thread_in_random.
576 (linux_wait_1): Likewise.
577
8dc7b443
SM
5782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * inferiors.c (find_inferior_id): Remove.
581 (find_thread_ptid): Move implemention from find_inferior_id to
582 here.
583 * inferiors.h (find_inferior_id): Remove.
584 * server.c (handle_status): Use find_thread_ptid.
585 (process_serial_event): Likewise.
586 * thread-db.c (find_one_thread): Likewise.
587 (thread_db_thread_handle): Likewise.
588 * win32-low.c (thread_rec): Likewise.
589 (child_delete_thread): Likewise.
590 (win32_thread_alive): Likewise.
591 (get_child_debug_event): Likewise.
592
da25033c
SM
5932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
594
595 * linux-mips-low.c (update_watch_registers_callback): Return
596 void, remove pid_p parameter, don't check for pid.
597 (mips_insert_point, mips_remove_point): Use for_each_thread.
598
c91bb56b
SM
5992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * lynx.low (lynx_delete_thread_callback): Remove.
602 (lynx_mourn): Use for_each_thread.
603
634a3254
SM
6042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
605
606 * regcache.c (regcache_invalidate_one): Remove.
607 (regcache_invalidate_pid): use for_each_thread.
608
41272101
TT
6092017-11-26 Tom Tromey <tom@tromey.com>
610
611 * linux-low.c (linux_create_inferior): Update.
612
f5291a6f
UW
6132017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
614
615 * spu-low.c (spu_create_inferior): Fix typo in argument name.
616
6654d750
AH
6172017-11-24 Alan Hayward <alan.hayward@arm.com>
618
619 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
620 * linux-aarch64-low.c (initialize_low_arch): Call init func.
621 * linux-aarch64-tdesc-selftest.c: New file.
622 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
623
6242017-11-24 Alan Hayward <alan.hayward@arm.com>
625
626 * configure.srv: Add new file.
627 * linux-aarch64-low.c (initialize_low_arch): Call init func.
628 * linux-aarch64-tdesc-selftest.c: New file.
629 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
630
49bdb7ee
AH
6312017-11-24 Alan Hayward <alan.hayward@arm.com>
632
633 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
634 * linux-aarch64-low.c (initialize_low_arch): Remove init.
635 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
636
d6d7ce56
AH
6372017-11-24 Alan Hayward <alan.hayward@arm.com>
638
639 * configure.srv: Add new files.
640 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
641 aarch64_linux_read_description.
642 * linux-aarch64-low.c (aarch64_linux_read_description):
643 Merge with aarch64_arch_setup.
644 (aarch64_arch_setup): Call aarch64_linux_read_description.
645 * linux-aarch64-tdesc.c: New file.
646 * linux-aarch64-tdesc.h: New file.
647
506fe5f4
YQ
6482017-11-24 Yao Qi <yao.qi@linaro.org>
649
650 * configure.srv: Set $srv_regobj for tic6x-linux.
651 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
652 (tic6x_read_description): Move some code to tic6x_arch_setup.
653 (tic6x_tdesc_test): New function.
654 (initialize_low_arch): Call selftests::register_test.
655
29f9a567
YQ
6562017-11-22 Yao Qi <yao.qi@linaro.org>
657
658 * remote-utils.c (prepare_resume_reply): Use memcpy.
659
578290ec
SM
6602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
661
662 * linux-low.c (kill_one_lwp_callback): Return void, take
663 argument directly, don't filter on pid.
664 (linux_kill): Use for_each_thread.
665
eca55aec
SM
6662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
667
668 * linux-low.c (need_step_over_p): Return bool, remove dummy
669 argument.
670 (linux_resume, proceed_all_lwps): Use find_thread.
671
25c28b4d
SM
6722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
673
674 * linux-low.c (resume_status_pending_p): Return bool, remove
675 flag_p argument.
676 (linux_resume): Use find_thread.
677
5fdda392
SM
6782017-11-19 Simon Marchi <simon.marchi@ericsson.com>
679
680 * linux-low.c (struct thread_resume_array): Remove.
681 (linux_set_resume_request): Return void, take arguments
682 directly.
683 (linux_resume): Use for_each_thread.
684
fcb056a5
SM
6852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
686
687 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
688 return bool, remove data argument.
689 (linux_stabilize_threads): Use find_thread.
690
139720c5
SM
6912017-11-19 Simon Marchi <simon.marchi@ericsson.com>
692
693 * linux-low.c (unsuspend_one_lwp): Remove.
694 (unsuspend_all_lwps): Use for_each_thread, inline code from
695 unsuspend_one_lwp.
696
6d1e5673
SM
6972017-11-19 Simon Marchi <simon.marchi@ericsson.com>
698
699 * gdbthread.h (find_thread): Add overload with ptid_t filter.
700 * linux-low.c (struct iterate_over_lwps_args): Remove.
701 (iterate_over_lwps_filter): Remove.
702 (iterate_over_lwps): Use find_thread.
703
bbf550d5
SM
7042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
705
706 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
707 (linux_handle_new_gdb_connection): Use for_each_thread, inline
708 code from reset_lwp_ptrace_options_callback.
709
00192f77
SM
7102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
711
712 * linux-arm-low.c (struct update_registers_data): Remove.
713 (update_registers_callback): Return void, take arguments
714 directly, don't check thread's pid.
715 (arm_insert_point, arm_remove_point): Use for_each_thread.
716
2bee2b6c
SM
7172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
718
719 * win32-low.c (continue_one_thread): Return void, take argument
720 directly.
721 (child_continue): Use for_each_thread.
722
0b360f19
SM
7232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
724
725 * win32-i386-low.c (update_debug_registers_callback): Rename
726 to ...
727 (update_debug_registers): ... this, return void, remove pid_p arg.
728 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
729
f27866ba
SM
7302017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
731
732 * inferiors.h (struct process_info): Add constructor, initialize
733 fields..
734 <syscalls_to_catch>: Change type to std::vector<int>.
735 * inferiors.c (add_process): Allocate process_info with new.
736 (remove_process): Free process_info with delete.
737 * linux-low.c (handle_extended_wait): Adjust.
738 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
739 * server.c (handle_general_set): Adjust.
740
e849ea89
PA
7412017-11-16 Pedro Alves <palves@redhat.com>
742
743 * remote-utils.c (remote_close): Block SIGIO signals instead of
744 uninstalling the SIGIO handler.
745
1d0aa65c
AH
7462017-11-16 Alan Hayward <alan.hayward@arm.com>
747
748 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
749
3491a34c
YQ
7502017-11-16 Yao Qi <yao.qi@linaro.org>
751
752 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
753 (tic6x_store_gregset): Likewise.
754 (tic6x_usrregs_info): Move it up.
755
a602f924
AH
7562017-11-15 Alan Hayward <alan.hayward@arm.com>
757
758 * Makefile.in: Update arch rules.
759 * configure.srv: Explicitly mark arch/ files.
760
5616b6c3
AS
7612017-11-13 Andreas Schwab <schwab@suse.de>
762
763 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
764 function.
765 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
766
d1928160
PA
7672017-11-06 Pedro Alves <palves@redhat.com>
768
769 * config.in, configure: Regenerate.
770
bac608e7
SM
7712017-10-27 Simon Marchi <simon.marchi@ericsson.com>
772
773 * target.c (struct thread_search): Remove.
774 (thread_search_callback): Remove.
775 (prepare_to_access_memory): Use for_each_thread instead of
776 find_inferior. Inline code from thread_search_callback.
777
eaddb425
SM
7782017-10-27 Simon Marchi <simon.marchi@ericsson.com>
779
780 * server.c (struct visit_actioned_threads_data): Remove.
781 (visit_actioned_threads): Change prototype to take arguments
782 directly.
783 (resume): Use find_thread instead of find_inferior.
784
99078d34
SM
7852017-10-27 Simon Marchi <simon.marchi@ericsson.com>
786
787 * server.c (queue_stop_reply_callback): Change prototype, return
788 void.
789 (find_status_pending_thread_callback): Remove.
790 (handle_status): Replace find_inferior with find_thread and
791 for_each_thread.
792
cc628f3d
AH
7932017-10-25 Alan Hayward <alan.hayward@arm.com>
794
795 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
796 with REGNO.
797 (aarch64_store_gregset): Likewise.
798 (aarch64_fill_fpregset): Likewise.
799 (aarch64_store_fpregset): Likewise.
800
4d3bb80e
SM
8012017-10-21 Simon Marchi <simon.marchi@ericsson.com>
802
803 * gdbthread.h (find_thread, for_each_thread): New functions.
804 * inferiors.c (thread_of_pid): Remove.
805 (find_any_thread_of_pid): Use find_thread.
806 * linux-low.c (num_lwps): Use for_each_thread.
807
7a7cdfa0
YQ
8082017-10-17 Yao Qi <yao.qi@linaro.org>
809
810 * Makefile.in: Remove one rule.
811 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
812
e675d170
YQ
8132017-10-17 Yao Qi <yao.qi@linaro.org>
814
815 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
816 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
817
7eb4e0f9
YQ
8182017-10-17 Yao Qi <yao.qi@linaro.org>
819
820 * configure.srv: Rename arm.o with arch/arm.o.
821
60d6cfc9
YQ
8222017-10-17 Yao Qi <yao.qi@linaro.org>
823
824 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
825 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
826 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
827 (arch-i386.o, arch-amd64.o): Remove rules.
828 (arch/%.o): New rule.
829 Update POSTCOMPILE and COMPILE.pre.
830 * configure.ac: Invoke AC_CONFIG_COMMANDS.
831 * configure: Re-generated.
832 * configure.srv: Replace arch-i386.o with arch/i386.o.
833 Replace arch-amd64.o with arch/amd64.o.
834
5bfda255
YQ
8352017-10-16 Yao Qi <yao.qi@linaro.org>
836
837 * configure: Regenerated.
838
9c80ecd6
SM
8392017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * inferiors.h: (struct inferior_list): Remove.
842 (struct inferior_list_entry); Remove.
843 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
844 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
845 get_first_inferior): Remove.
846 (for_each_inferior, for_each_inferior_with_data, find_inferior,
847 find_inferior_id, find_inferior_in_random): Change signature.
848 * inferiors.c (all_threads): Change type to
849 std::list<thread_info *>.
850 (get_thread): Remove macro.
851 (find_inferior, find_inferior_id): Change signature, implement
852 using find_thread.
853 (find_inferior_in_random): Change signature, implement using
854 find_thread_in_random.
855 (for_each_inferior, for_each_inferior_with_data): Change
856 signature, implement using for_each_thread.
857 (add_inferior_to_list, remove_inferior): Remove.
858 (add_thread, get_first_thread, thread_of_pid,
859 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
860 (get_first_inferior, one_inferior_p, clear_inferior_list):
861 Remove.
862 (clear_inferiors, get_thread_process): Update.
863 * gdbthread.h: Include <list>.
864 (struct thread_info) <entry>: Remove field.
865 <id>: New field.
866 (all_threads): Change type to std::list<thread_info *>.
867 (get_first_inferior): Add doc.
868 (find_thread, for_each_thread, find_thread_in_random): New
869 functions.
870 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
871 * linux-arm-low.c (update_registers_callback): Update.
872 * linux-low.c (second_thread_of_pid_p): Update.
873 (kill_one_lwp_callback, linux_detach_lwp_callback,
874 delete_lwp_callback, status_pending_p_callback, same_lwp,
875 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
876 iterate_over_lwps, not_stopped_callback,
877 resume_stopped_resumed_lwps, count_events_callback,
878 select_singlestep_lwp_callback, select_event_lwp_callback,
879 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
880 suspend_and_send_sigstop_callback, wait_for_sigstop,
881 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
882 lwp_running, linux_set_resume_request, resume_status_pending_p,
883 need_step_over_p, start_step_over, linux_resume_one_thread,
884 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
885 reset_lwp_ptrace_options_callback): Update.
886 * linux-mips-low.c (update_watch_registers_callback): Update.
887 * regcache.c (regcache_invalidate_one, regcache_invalidate):
888 Update.
889 (free_register_cache_thread_one): Remove.
890 (regcache_release): Update.
891 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
892 handle_qxfer_threads_worker): Update.
893 (handle_query): Update, use list iterator.
894 (visit_actioned_threads, handle_pending_status,
895 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
896 clear_pending_status_callback, set_pending_status_callback,
897 find_status_pending_thread_callback, handle_status,
898 process_serial_event): Update.
899 * target.c (thread_search_callback): Update.
900 * thread-db.c (thread_db_get_tls_address): Update.
901 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
902 Update.
903 * win32-i386-low.c (update_debug_registers_callback): Update.
904 * win32-low.c (delete_thread_info, child_delete_thread,
905 continue_one_thread, suspend_one_thread,
906 get_child_debug_event): Adjust.
907
9179355e
SM
9082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
909
910 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
911 * inferiors.h: Include <list>.
912 (struct process_info) <entry>: Remove field.
913 <pid>: New field.
914 (pid_of): Change macro to function.
915 (ptid_of, lwpid_of): Remove macro.
916 (all_processes): Change type to std::list<process_info *>.
917 (ALL_PROCESSES): Remove macro.
918 (for_each_process, find_process): New function.
919 * inferiors.c (all_processes): Change type to
920 std::list<process_info *>.
921 (find_thread_process): Adjust.
922 (add_process): Likewise.
923 (remove_process): Likewise.
924 (find_process_pid): Likewise.
925 (get_first_process): Likewise.
926 (started_inferior_callback): Remove.
927 (have_started_inferiors_p): Adjust.
928 (attached_inferior_callback): Remove.
929 (have_attached_inferiors_p): Adjust.
930 * linux-low.c (check_zombie_leaders): Likewise.
931 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
932 (x86_linux_update_xmltarget): Adjust.
933 * server.c (handle_query): Likewise.
934 (gdb_reattached_process): Remove.
935 (handle_status): Adjust.
936 (kill_inferior_callback): Likewise.
937 (detach_or_kill_inferior): Remove.
938 (print_started_pid): Likewise.
939 (print_attached_pid): Likewise.
940 (detach_or_kill_for_exit): Update.
941 (process_serial_event): Likewise.
942 * linux-arm-low.c (arm_new_fork): Likewise.
943
c9cb8905
SM
9442017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
945
946 * dll.h: Include <list>.
947 (struct dll_info): Add constructor.
948 <entry>: Remove field.
949 (all_dlls): Change type to std::list<dll_info>.
950 * dll.c: Include <algorithm>.
951 (get_dll): Remove macro.
952 (all_dlls): Change type to std::list<dll_info *>.
953 (free_one_dll): Remove.
954 (match_dll): Likewise.
955 (loaded_dll): Adjust.
956 (unloaded_dll): Adjust to all_dlls type change, use
957 std::find_if. Inline code from match_dll.
958 (clear_dlls): Adjust to all_dlls type change.
959 * server.c (emit_dll_description): Remove.
960 (handle_qxfer_libraries): Adjust to all_dlls type change,
961 integrate emit_dll_description's functionality.
962
04ec7890
SM
9632017-10-12 Simon Marchi <simon.marchi@ericsson.com>
964
965 * linux-low.h (struct linux_target_ops) <delete_process>: New
966 field.
967 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
968 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
969 (struct linux_target_ops): Add delete_process callback.
970 * linux-arm-low.c (arm_delete_process): New.
971 (struct linux_target_ops): Add delete_process callback.
972 * linux-bfin-low.c (struct linux_target_ops): Likewise.
973 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
974 * linux-m32r-low.c (struct linux_target_ops): Likewise.
975 * linux-mips-low.c (mips_linux_delete_process): New.
976 (struct linux_target_ops): Add delete_process callback.
977 * linux-ppc-low.c (struct linux_target_ops): Likewise.
978 * linux-s390-low.c (struct linux_target_ops): Likewise.
979 * linux-sh-low.c (struct linux_target_ops): Likewise.
980 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
981 * linux-tile-low.c (struct linux_target_ops): Likewise.
982 * linux-x86-low.c (x86_linux_delete_process): New.
983 (struct linux_target_ops): Add delete_process callback.
984 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
985
466eecee
SM
9862017-10-12 Simon Marchi <simon.marchi@ericsson.com>
987
988 * linux-aarch64-low.c (the_low_target): Add thread delete
989 callback.
990 * linux-arm-low.c (arm_delete_thread): New function.
991 (the_low_target): Add thread delete callback.
992 * linux-bfin-low.c (the_low_target): Likewise.
993 * linux-crisv32-low.c (the_low_target): Likewise.
994 * linux-low.c (delete_lwp): Invoke delete_thread callback if
995 set.
996 * linux-low.h (struct linux_target_ops) <delete_thread>: New
997 field.
998 * linux-m32r-low.c (the_low_target): Add thread delete callback.
999 * linux-mips-low.c (mips_linux_delete_thread): New function.
1000 (the_low_target): Add thread delete callback.
1001 * linux-ppc-low.c (the_low_target): Likewise.
1002 * linux-s390-low.c (the_low_target): Likewise.
1003 * linux-sh-low.c (the_low_target): Likewise.
1004 * linux-tic6x-low.c (the_low_target): Likewise.
1005 * linux-tile-low.c (the_low_target): Likewise.
1006 * linux-x86-low.c (the_low_target): Likewise.
1007 * linux-xtensa-low.c (the_low_target): Likewise.
1008
b79f7801
YZ
10092017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1010
1011 * win32-low.c: Include "common-inferior.h".
1012
bc3b087d
SDJ
10132017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1014
1015 * inferiors.c (set_inferior_cwd): New function.
1016 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1017 (handle_query): Inform that QSetWorkingDir is supported.
1018 * win32-low.c (create_process): Pass the inferior's cwd to
1019 CreateProcess.
1020
d092c5a2
SDJ
10212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1022
1023 * inferiors.c (current_inferior_cwd): New global variable.
1024 (get_inferior_cwd): New function.
1025 * inferiors.h (struct process_info) <cwd>: New field.
1026
7da0a886
SDJ
10272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1028
1029 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1030 (OBS): Add gdb_tilde_expand.o.
1031
289a6840
SM
10322017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1033
1034 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1035 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1036
256642e8
PA
10372017-09-29 Pedro Alves <palves@redhat.com>
1038
1039 * ax.c (gdb_parse_agent_expr): Constify.
1040 * ax.h (gdb_parse_agent_expr): Constify.
1041 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1042 Constify.
1043 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1044 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1045 * remote-utils.h (read_ptid): Constify.
1046 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1047 (process_point_options, process_serial_event): Constify.
1048 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1049 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1050 (cmd_qtbuffer): Constify.
1051
5b9ca4d4
PA
10522017-09-29 Pedro Alves <palves@redhat.com>
1053
1054 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1055 fails.
1056
94c207e0
PA
10572017-09-29 Pedro Alves <palves@redhat.com>
1058
1059 * linux-low.c (handle_extended_wait): Pass parent thread instead
1060 of process to thread_db_notice_clone.
1061 * linux-low.h (thread_db_notice_clone): Replace parent process
1062 parameter with parent thread parameter.
1063 * thread-db.c (find_one_thread): Add comment.
1064 (thread_db_notice_clone): Replace parent process parameter with
1065 parent thread parameter. Temporarily switch to the parent thread.
1066
75352e28
SDJ
10672017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1068
1069 * gdbthread.h: Include "common-gdbthread.h".
1070 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1071 "if" when validating the ptid.
1072 * remote-utils.c: Include "gdbthread.h".
1073 (prepare_resume_reply): Use "switch_to_thread".
1074 * target.c (done_accessing_memory): Likewise.
1075
ad339634
AA
10762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1077
1078 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1079 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1080 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1081 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1082 s390x-gs-linux64-ipa.o to ipa_obj.
1083 * linux-s390-low.c (HWCAP_S390_GS): New define.
1084 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1085 New functions.
1086 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1087 (s390_arch_setup): Check for guarded-storage support and choose
1088 appropriate tdesc.
1089 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1090 init_registers_s390x_gs_linux64.
1091 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1092 enum value.
1093 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1094 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1095
cc4d742f
SM
10962017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1097
1098 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1099
f6327dcb
KB
11002017-09-21 Kevin Buettner <kevinb@redhat.com>
1101
1102 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1103 (thread_db_thread_handle): Declare.
1104 * linux-low.c (linux_target_ops): Initialize thread_handle.
1105 * server.c (handle_qxfer_threads_worker): Add support for
1106 "handle" attribute.
1107 * target.h (struct target_ops): Add new function pointer,
1108 thread_handle.
1109 (target_thread_handle): Define.
1110 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1111 field in lwp.
1112 (thread_db_thread_handle): New function.
1113
86299109
KB
11142017-09-21 Kevin Buettner <kevinb@redhat.com>
1115
1116 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1117 * linux-low.h (thread_db_notice_clone): Declare.
1118 * thread-db.c (thread_db_notice_clone): New function.
1119
f557a88a
PA
11202017-09-21 Pedro Alves <palves@redhat.com>
1121
1122 * server.c (gdb_read_memory, handle_status, process_serial_event)
1123 (handle_serial_event, handle_target_event): Adjust to
1124 set_desired_thread prototype change.
1125 * target.c (set_desired_thread): Remove 'use_general' parameter
1126 and adjust.
1127 * target.h (set_desired_thread): Remove 'use_general' parameter.
1128
223ffa71
TT
11292017-09-20 Tom Tromey <tom@tromey.com>
1130
1131 * target.c (target_terminal::terminal_state): Define.
1132 (target_terminal::init): Rename from target_terminal_init.
1133 (target_terminal::inferior): Rename from
1134 target_terminal_inferior.
1135 (target_terminal::ours): Rename from target_terminal_ours.
1136 (target_terminal::ours_for_output, target_terminal::info): New.
1137
04fd3ba9
SM
11382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1139
1140 * server.c (accumulate_file_name_length): Remove.
1141 (emit_dll_description): Adjust to std::string change.
1142 (handle_qxfer_libraries): Use std::string to hold document.
1143
5e187554
SM
11442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1147 return type of xml_escape_text.
1148 * server.c (emit_dll_description): Likewise.
1149
1526853e
SM
11502017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1151
1152 * server.c (captured_main): Accept argument for --selftest.
1153 Update run_tests call.
1154 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1155 when registering selftests.
1156
c4dfafab
SDJ
11572017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1158
1159 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1160 instead of "VEC" for "target_desc.reg_defs".
1161 (regcache_cpy): Likewise.
1162 (registers_to_string): Likewise.
1163 (registers_from_string): Likewise.
1164 (find_regno): Likewise.
1165 (supply_regblock): Likewise.
1166 (regcache_raw_read_unsigned): Likewise.
1167 * tdesc.c (init_target_desc): Likewise.
1168 (tdesc_create_reg): Likewise.
1169 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1170 (struct target_desc) <reg_defs>: Convert to "std::vector".
1171 (target_desc): Do not initialize "reg_defs".
1172 (~target_desc): Update code to use "std::vector" instead of "VEC"
1173 for "target_desc.reg_defs".
1174 (operator==): Likewise.
1175
124aceb4
SM
11762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1177
1178 * inferiors.h (thread_to_gdb_id): Remove.
1179 * inferiors.c (thread_to_gdb_id): Remove.
1180 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1181 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1182 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1183 Likewise.
1184 * nto-low.c (nto_fetch_registers, nto_store_registers,
1185 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1186
96cde54f
SM
11872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1188
1189 * inferiors.h (gdb_id_to_thread_id): Remove.
1190 * inferiors.c (gdb_id_to_thread_id): Remove.
1191 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1192 removal. Move pid declaration closer to where it's used.
1193
e8ca139e
SM
11942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * server.c (handle_detach): New function.
1197 (process_serial_event): Move code out, call handle_detach.
1198
f8a4e119
SM
11992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * server.c (require_running): Rename to ...
1202 (require_running_or_return): ... this ...
1203 (require_running_or_break): ... and this.
1204 (handle_query, process_serial_event): Adjust.
1205
0eb0a407
SM
12062017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1207
1208 * linux-low.c (linux_set_resume_request): Remove unused
1209 variables.
1210
785922a5
SM
12112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * server.c (first_thread_of): Remove.
1214 (process_serial_event): Replace usage of first_thread_of with
1215 find_any_thread_of_pid.
1216 * tracepoint.c (same_process_p): Remove.
1217 (gdb_agent_about_to_close): Replace usage of same_process_p with
1218 find_any_thread_of_pid.
1219 * linux-x86-low.c (same_process_callback): Remove.
1220 (x86_arch_setup_process_callback): Replace usage of
1221 same_process_callback with find_any_thread_of_pid.
1222 * thread-db.c (any_thread_of): Remove.
1223 (switch_to_process): Replace usage of any_thread_of with
1224 find_any_thread_of_pid.
1225 * inferiors.c (thread_pid_matches_callback): Remove.
1226 (find_thread_process): Adjust to use find_any_thread_of_pid.
1227
a059f00c
SDJ
12282017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * regcache.c (get_thread_regcache): Guard calls to "memset"
1231 with "!VEC_empty".
1232
cc397f3a
SDJ
12332017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1234
1235 * linux-low.c (handle_extended_wait): Use
1236 "allocate_target_description" instead of "XNEW".
1237 * linux-x86-low.c (initialize_low_arch): Likewise.
1238
22916b07
YQ
12392017-09-05 Yao Qi <yao.qi@linaro.org>
1240
1241 * configure.srv (srv_i386_regobj): Remove.
1242 (srv_amd64_regobj): Remove.
1243 (srv_regobj): Set it to "" for x86 non-linux targets.
1244 * linux-x86-tdesc.c (i386_linux_read_description):
1245 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1246 (init_registers_i386): Remove the declaration.
1247 (tdesc_i386): Remove the declaration.
1248 (lynx_i386_arch_setup): Call i386_create_target_description.
1249 * nto-x86-low.c: Likewise.
1250 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1251 [!__x86_64__]: include arch/i386.h.
1252 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1253
38602d55
YQ
12542017-09-05 Yao Qi <yao.qi@linaro.org>
1255
1256 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1257 i386/amd64-XXX-linux from it.
1258
44b886ff
YQ
12592017-09-05 Yao Qi <yao.qi@linaro.org>
1260
1261 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1262 false.
1263 (ipa_amd64_linux_regobj): Remove.
1264 (ipa_x32_linux_regobj): Remove.
1265
b4570e4b
YQ
12662017-09-05 Yao Qi <yao.qi@linaro.org>
1267
1268 * Makefile.in (arch-amd64.o): New rule.
1269 * configure.srv: Append arch-amd64.o.
1270 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1271 (get_ipa_tdesc): Call amd64_linux_read_description.
1272 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1273 and init_registers_amd64_XXX.
1274 * linux-x86-low.c (x86_linux_read_description): Call
1275 amd64_linux_read_description.
1276 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1277 (initialize_low_arch): Don't call init_registers_x32_XXX and
1278 init_registers_amd64_XXX.
1279 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1280 and tdesc_amd64_XXX.
1281 [__x86_64__] (amd64_tdesc_test): New function.
1282 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1283 and init_registers_amd64_XXX.
1284 * linux-x86-tdesc.c: Include arch/amd64.h.
1285 (xcr0_to_tdesc_idx): New function.
1286 (i386_linux_read_description): New function.
1287 (amd64_get_ipa_tdesc_idx): New function.
1288 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1289 (amd64_get_ipa_tdesc): Declare.
1290
d1f28ea2
YQ
12912017-09-05 Yao Qi <yao.qi@linaro.org>
1292
1293 * configure.srv (srv_i386_linux_xmlfiles): Remove
1294 i386/i386-XXX-linux.xml from it.
1295
25a93583
YQ
12962017-09-05 Yao Qi <yao.qi@linaro.org>
1297
1298 * configure.srv: Set srv_i386_linux_regobj empty if $development
1299 is false.
1300 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1301 initialize_low_tdesc.
1302 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1303 with #if initialize_low_tdesc.
1304 * linux-x86-tdesc-selftest.c: New file.
1305 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1306
5f035c07
YQ
13072017-09-05 Yao Qi <yao.qi@linaro.org>
1308
1309 * Makefile.in (arch-i386.o): New rule.
1310 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1311 (x86_64-*-linux*): Likewise.
1312 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1313 include arch/i386.h.
1314 (i386_linux_read_description): Remove code and call
1315 i386_create_target_description.
1316 * tdesc.c (allocate_target_description): New function.
1317 * tdesc.h (set_tdesc_architecture): Remove declaration.
1318 (set_tdesc_osabi): Likewise.
1319
0abe8a89
YQ
13202017-09-05 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1323 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1324 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1325 .xmltarget.
1326 * server.c (get_features_xml): Call tdesc_get_features_xml.
1327 * tdesc.c (set_tdesc_architecture): New function.
1328 (set_tdesc_osabi): New function.
1329 (tdesc_get_features_xml): New function.
1330 (tdesc_create_feature): Add an argument.
1331 * tdesc.h (struct target_desc) <features>: New field.
1332 <arch, osabi>: New field.
1333 (~target_desc): xfree features, arch, and osabi.
1334 (target_desc::oerator==): Don't compare .xmltarget.
1335 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1336 (set_tdesc_osabi): Likewise.
1337 (tdesc_get_features_xml): Likewise.
1338
0a188386
YQ
13392017-09-05 Yao Qi <yao.qi@linaro.org>
1340
1341 * linux-x86-tdesc.c: Include selftest.h.
1342 (i386_tdesc_test): New function.
1343 (initialize_low_tdesc): Call selftests::register_test.
1344 * tdesc.h: Include regdef.h.
1345 (target_desc): Override operator == and !=.
1346
f49ff000
YQ
13472017-09-05 Yao Qi <yao.qi@linaro.org>
1348
1349 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1350 (ipa_obj): Likewise.
1351 * linux-i386-ipa.c: Include common/x86-xstate.h
1352 (get_ipa_tdesc): Call i386_linux_read_description.
1353 (initialize_low_tracepoint): Don't call init_registers_XXX
1354 functions, call initialize_low_tdesc instead.
1355 * linux-x86-low.c (x86_linux_read_description): Call
1356 i386_linux_read_description.
1357 (initialize_low_arch): Don't call init_registers_i386_XXX
1358 functions, call initialize_low_tdesc.
1359 * linux-x86-tdesc.c: New file.
1360 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1361 (i386_get_ipa_tdesc_idx): Declare.
1362 (i386_get_ipa_tdesc): Declare.
1363 (initialize_low_tdesc): Declare.
1364
2b68ef2f
YQ
13652017-09-05 Yao Qi <yao.qi@linaro.org>
1366
1367 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1368 instead of 0.
1369
f7000548
YQ
13702017-09-05 Yao Qi <yao.qi@linaro.org>
1371
1372 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1373 * regcache.c (get_thread_regcache): Use VEC_length.
1374 (init_register_cache): Likewise.
1375 (regcache_cpy): Likewise.
1376 (registers_to_string): Iterate reg_defs via VEC_iterate.
1377 (find_regno): Likewise.
1378 (find_register_by_number): Use VEC_index.
1379 (register_size): Call find_register_by_number.
1380 (register_data): Call find_register_by_number.
1381 (supply_regblock): Use VEC_length.
1382 (regcache_raw_read_unsigned): Likewise.
1383 * tdesc.c (init_target_desc): Iterate reg_defs via
1384 VEC_iterate.
1385 (default_description): Update initializer.
1386 (copy_target_description): Don't update field num_registers.
1387 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1388 <num_registers>: Remove.
1389
50a421ac
SM
13902017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1391
1392 * Makefile.in (.SECONDARY): Define target.
1393
23fdd69e
SM
13942017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1395
1396 * linux-low.c (linux_wait_1): Adjust.
1397 * server.c (queue_stop_reply_callback): Adjust.
1398
0a2dde4a
SDJ
13992017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1400
1401 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1402 QEnvironmentUnset and QEnvironmentReset packets.
1403 (handle_query): Inform remote that QEnvironmentHexEncoded,
1404 QEnvironmentUnset and QEnvironmentReset are supported.
1405
6afd337d
SM
14062017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1407
1408 * inferiors.h (inferior_target_data): Rename to ...
1409 (thread_target_data): ... this.
1410 (inferior_regcache_data): Rename to ...
1411 (thread_regcache_data): ... this.
1412 (set_inferior_regcache_data): Rename to ...
1413 (set_thread_regcache_data): ... this.
1414 * inferiors.c (inferior_target_data): Rename to ...
1415 (thread_target_data): ... this.
1416 (inferior_regcache_data): Rename to ...
1417 (thread_regcache_data): ... this.
1418 (set_inferior_regcache_data): Rename to ...
1419 (set_thread_regcache_data): ... this.
1420 (free_one_thread): Update.
1421 * linux-low.h (get_thread_lwp): Update.
1422 * regcache.c (get_thread_regcache): Update.
1423 (regcache_invalidate_thread): Update.
1424 (free_register_cache_thread): Update.
1425 * win32-i386-low.c (update_debug_registers_callback): Update.
1426 (win32_get_current_dr): Update.
1427 * win32-low.c (thread_rec): Update.
1428 (delete_thread_info): Update.
1429 (continue_one_thread): Update.
1430 (suspend_one_thread): Update.
1431
a160cc46
SM
14322017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * inferiors.c (set_inferior_target_data): Remove.
1435 * inferiors.h (set_inferior_target_data): Remove.
1436
6d580b63
YQ
14372017-08-18 Yao Qi <yao.qi@linaro.org>
1438
1439 * Makefile.in (OBS): Add selftest.o.
1440 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1441 * configure, config.in: Re-generated.
1442 * server.c: Include common/sefltest.h.
1443 (captured_main): Handle option --selftest.
1444
f5a29eb0
YQ
14452017-08-09 Yao Qi <yao.qi@linaro.org>
1446
1447 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1448 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1449 i386-avx-mpx.o and i386-mmx.o.
1450 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1451 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1452 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1453 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1454 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1455 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1456 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1457 i386/amd64-avx-mpx.xml.
1458
57757c2f
YQ
14592017-08-09 Yao Qi <yao.qi@linaro.org>
1460
1461 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1462 and x32-avx-avx512.o.
1463 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1464 i386/x32-avx-avx512.xml.
1465
229d26fc
SM
14662017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * tracepoint.h (enum class fast_tpoint_collect_result): New
1469 enumeration.
1470 (fast_tracepoint_collecting): Change return type to
1471 fast_tpoint_collect_result.
1472 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1473 * linux-low.h: Include tracepoint.h.
1474 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1475 fast_tpoint_collect_result.
1476 * linux-low.c (handle_tracepoints): Adjust.
1477 (linux_fast_tracepoint_collecting): Change return type to
1478 fast_tpoint_collect_result.
1479 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1480 linux_wait_1, stuck_in_jump_pad_callback,
1481 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1482 proceed_one_lwp): Adjust to type change.
1483
2e1e43e1
YQ
14842017-07-10 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1487
adc764e7
YQ
14882017-06-29 Yao Qi <yao.qi@linaro.org>
1489
1490 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1491 Remove.
1492 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1493
a206891a
SM
14942017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1495
1496 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1497
9a6c7d9c
SDJ
14982017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1499
1500 * linux-low.c (linux_create_inferior): Adjust code to access the
1501 environment information via 'gdb_environ' class.
1502 * lynx-low.c (lynx_create_inferior): Likewise.
1503 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1504 (get_environ): Return a pointer to 'our_environ'.
1505 (captured_main): Initialize 'our_environ'.
1506 * server.h (get_environ): Adjust prototype.
1507 * spu-low.c (spu_create_inferior): Adjust code to access the
1508 environment information via 'gdb_environ' class.
1509
ae3e2ccf
SM
15102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1511
1512 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1513 usage of "register" keyword.
1514
3e019bdc
SM
15152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * configure: Re-generate.
1518
8465943a
SM
15192017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1520
1521 * configure: Re-generate.
1522
cf0dd6f0
SM
15232017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1524
1525 * Makefile.in (COMPILE.pre): Add "-x c++".
1526
9845682b
SDJ
15272017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1528
1529 * fork-child.c: Conditionally include <signal.h>.
1530
aefd8b33
SDJ
15312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1532
1533 * server.c (handle_general_set): Handle new packet
1534 "QStartupWithShell".
1535 (handle_query): Add "QStartupWithShell" to the list of supported
1536 packets.
1537 (gdbserver_usage): Add help text explaining the
1538 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1539 options.
1540 (captured_main): Recognize and act upon the presence of the new
1541 CLI options.
1542
2090129c
SDJ
15432017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1544 Pedro Alves <palves@redhat.com>
1545
1546 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1547 * configure: Regenerate.
1548 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1549 "fork-inferior.o".
1550 (i[34567]86-*-lynxos*): Likewise.
1551 (spu*-*-*): Likewise.
1552 * fork-child.c: New file.
1553 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1554 and "environ.h".
1555 (linux_ptrace_fun): New function.
1556 (linux_create_inferior): Adjust function prototype to reflect
1557 change on "target.h". Adjust function code to use
1558 "fork_inferior".
1559 (linux_request_interrupt): Delete "signal_pid".
1560 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1561 (lynx_ptrace_fun): New function.
1562 (lynx_create_inferior): Adjust function prototype to reflect
1563 change on "target.h". Adjust function code to use
1564 "fork_inferior".
1565 * nto-low.c (nto_create_inferior): Adjust function prototype and
1566 code to reflect change on "target.h". Update comments.
1567 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1568 "common-terminal.h" and "environ.h".
1569 (terminal_fd): Moved to fork-child.c.
1570 (old_foreground_pgrp): Likewise.
1571 (restore_old_foreground_pgrp): Likewise.
1572 (last_status): Make it global.
1573 (last_ptid): Likewise.
1574 (our_environ): New variable.
1575 (startup_with_shell): Likewise.
1576 (program_name): Likewise.
1577 (program_argv): Rename to...
1578 (program_args): ...this.
1579 (wrapper_argv): New variable.
1580 (start_inferior): Delete function.
1581 (get_exec_wrapper): New function.
1582 (get_exec_file): Likewise.
1583 (get_environ): Likewise.
1584 (prefork_hook): Likewise.
1585 (post_fork_inferior): Likewise.
1586 (postfork_hook): Likewise.
1587 (postfork_child_hook): Likewise.
1588 (handle_v_run): Update code to deal with arguments coming from the
1589 remote host. Update calls from "start_inferior" to
1590 "create_inferior".
1591 (captured_main): Likewise. Initialize environment variable. Call
1592 "have_job_control".
1593 * server.h (post_fork_inferior): New prototype.
1594 (get_environ): Likewise.
1595 (last_status): Declare.
1596 (last_ptid): Likewise.
1597 (signal_pid): Likewise.
1598 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1599 (spu_ptrace_fun): New function.
1600 (spu_create_inferior): Adjust function prototype to reflect change
1601 on "target.h". Adjust function code to use "fork_inferior".
1602 * target.c (target_terminal_init): New function.
1603 (target_terminal_inferior): Likewise.
1604 (target_terminal_ours): Likewise.
1605 * target.h: Include <vector>.
1606 (struct target_ops) <create_inferior>: Update prototype.
1607 (create_inferior): Update macro.
1608 * utils.c (gdb_flush_out_err): New function.
1609 * win32-low.c (win32_create_inferior): Adjust function prototype
1610 and code to reflect change on "target.h".
1611
043a4934
SDJ
16122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * inferiors.c (switch_to_thread): New function.
1615
15652511
SDJ
16162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1617
1618 * Makefile.in (SFILE): Add "common/job-control.c".
1619 (OBS): Add "job-control.o".
1620
21ea5acd
SDJ
16212017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1622
1623 * Makefile: Remove "@host_makefile_frag@".
1624
e13cb306
PA
16252017-05-05 Pedro Alves <palves@redhat.com>
1626
1627 * configure: Regenerate.
1628
c94fee56
SDJ
16292017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1630
1631 * configure: Regenerate.
1632
a0ff9e1a
SM
16332017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1636 software_single_step change of return type to
1637 std::vector<CORE_ADDR>.
1638 * linux-low.c (install_software_single_step_breakpoints):
1639 Likewise.
1640 * linux-low.h (install_software_single_step_breakpoints):
1641 Likewise.
1642
be628ab8
SDJ
16432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1644
1645 * remote-utils.c: Include "gdb_termios.h" instead of
1646 "terminal.h".
1647 * terminal.h: Delete file.
1648
7c5ded6a
SDJ
16492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1650
1651 * server.c: Include <vector>.
1652 <program_argv, wrapper_argv>: Convert to std::vector.
1653 (start_inferior): Rewrite function to use C++.
1654 (handle_v_run): Likewise. Update code that calculates the argv
1655 based on the vRun packet; use C++.
1656 (captured_main): Likewise.
1657
436252de
SM
16582017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * server.c (handle_v_cont): Initialize thread_resume::thread
1661 with null_ptid.
1662
9bf2a700
PA
16632017-04-05 Pedro Alves <palves@redhat.com>
1664
1665 * configure: Regenerate.
1666
a121b7c1
PA
16672017-04-05 Pedro Alves <palves@redhat.com>
1668
1669 * gdbreplay.c (sync_error): Constify.
1670 * linux-x86-low.c (push_opcode): Constify.
1671
21c8a587
PA
16722017-04-05 Pedro Alves <palves@redhat.com>
1673
1674 * win32-low.c (get_child_debug_event)
1675 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1676 Report TARGET_WAITKIND_SPURIOUS instead.
1677
fb32b4f7
PA
16782017-04-05 Pedro Alves <palves@redhat.com>
1679
1680 * remote-utils.c (remote_prepare, remote_open): Constify.
1681 * remote-utils.h (remote_prepare, remote_open): Constify.
1682 * server.c (captured_main): Constify 'port' handling.
1683
65dd1e59
SM
16842017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1685
1686 * Makefile.in (clean): Clear .deps.
1687
8fa5b777
SM
16882017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * .gitignore: Remove generated files, replace with wildcard.
1691 * (clean): Replace removal of generated files with wildcard.
1692 (version.c): Replace with...
1693 (version-generated.c): ...this.
1694 (xml-builtin.c): Replace with...
1695 (xml-builtin-generated.c): ...this.
1696 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1697 (%.c: *regformats*): Replace with...
1698 (%-generated.c: *regformats*): ...this.
1699
a12e714b
MF
17002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1701
1702 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1703 (xtensa_fill_gregset): Call collect_register_by_name for
1704 threadptr register.
1705 (xtensa_store_gregset): Call supply_register_by_name for
1706 threadptr register.
1707
1a09b50a
MF
17082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1709
1710 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1711 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1712 (xtensa_store_gregset): Call supply_register for all registers in
1713 a0_regnum..a0_regnum + C0_NREGS range.
1714
1a01e7c6
SM
17152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1716
1717 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1718 (ax-ipa.o: ax.c): Remove.
1719 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1720 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1721 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1722 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1723 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1724
36bc18a8
SM
17252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1728 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1729 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1730 (errors-ipa.o: ../common/errors.c): Remove.
1731 (format-ipa.o: ../common/format.c): Remove.
1732 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1733
a8ebe3d5
SM
17342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1735
1736 * Makefile.in (%-ipa.o: %.c): New rule.
1737 (tracepoint-ipa.o: tracepoint.c): Remove.
1738 (utils-ipa.o: utils.c): Remove.
1739 (remote-utils-ipa.o: remote-utils.c): Remove.
1740 (regcache-ipa.o: regcache.c): Remove.
1741 (i386-linux-ipa.o: i386-linux.c): Remove.
1742 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1743 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1744 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1745 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1746 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1747 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1748 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1749 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1750 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1751 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1752 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1753 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1754 (aarch64-ipa.o: aarch64.c): Remove.
1755 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1756 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1757 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1758 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1759 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1760 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1761 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1762 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1763 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1764 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1765 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1766 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1767 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1768 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1769 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1770 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1771 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1772 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1773 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1774 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1775 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1776 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1777 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1778 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1779 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1780 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1781 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1782 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1783 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1784 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1785 (tdesc-ipa.o: tdesc.c): Remove.
1786 (x32-linux-ipa.o: x32-linux.c): Remove.
1787 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1788 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1789
50cfacb7
SM
17902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * Makefile.in (%.o: ../arch/%.c): New rule.
1793 (arm.o: ../arch/arm.c): Remove.
1794 (arm-linux.o: ../arch/arm-linux.c): Remove.
1795 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1796 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1797
c5a22423
SM
17982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1799
1800 * Makefile.in (%.o: ../nat/%.c): New rule.
1801 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1802 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1803 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1804 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1805 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1806 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1807 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1808 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1809 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1810 (linux-personality.o: ../nat/linux-personality.c): Remove.
1811 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1812 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1813 (x86-linux.o: ../nat/x86-linux.c): Remove.
1814 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1815 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1816
6bda016b
SM
18172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1818
1819 * Makefile.in (%.o: ../common/%.c): New rule.
1820 (signals.o: ../common/signals.c): Remove.
1821 (print-utils.o: ../common/print-utils.c): Remove.
1822 (rsp-low.o: ../common/rsp-low.c): Remove.
1823 (common-utils.o: ../common/common-utils.c): Remove.
1824 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1825 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1826 (vec.o: ../common/vec.c): Remove.
1827 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1828 (xml-utils.o: ../common/xml-utils.c): Remove.
1829 (ptid.o: ../common/ptid.c): Remove.
1830 (buffer.o: ../common/buffer.c): Remove.
1831 (format.o: ../common/format.c): Remove.
1832 (filestuff.o: ../common/filestuff.c): Remove.
1833 (agent.o: ../common/agent.c): Remove.
1834 (errors.o: ../common/errors.c): Remove.
1835 (environ.o: ../common/environ.c): Remove.
1836 (common-debug.o: ../common/common-debug.c): Remove.
1837 (cleanups.o: ../common/cleanups.c): Remove.
1838 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1839 (fileio.o: ../common/fileio.c): Remove.
1840 (common-regcache.o: ../common/common-regcache.c): Remove.
1841 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1842 (new-op.o: ../common/new-op.c): Remove.
1843 (btrace-common.o: ../common/btrace-common.c): Remove.
1844
21122961
SM
18452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1846
1847 * Makefile.in (%.o: ../target/%.c): New rule.
1848 (waitstatus.o: ../target/waitstatus.c): Remove.
1849
c362e621
SM
18502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1851
1852 * Makefile.in
1853 (%.c: ../regformats/%.dat,
1854 (%.c: ../regformats/arm/%.dat,
1855 (%.c: ../regformats/i386/%.dat,
1856 (%.c: ../regformats/rs6000/%.dat): New rules.
1857 (aarch64.c): Remove.
1858 (reg-arm.c): Remove.
1859 (arm-with-iwmmxt.c): Remove.
1860 (arm-with-vfpv2.c): Remove.
1861 (arm-with-vfpv3.c): Remove.
1862 (arm-with-neon.c): Remove.
1863 (reg-bfin.c): Remove.
1864 (reg-cris.c): Remove.
1865 (reg-crisv32.c): Remove.
1866 (i386.c): Remove.
1867 (i386-linux.c): Remove.
1868 (i386-avx.c): Remove.
1869 (i386-avx-linux.c): Remove.
1870 (i386-avx-avx512.c): Remove.
1871 (i386-avx-avx512-linux.c): Remove.
1872 (i386-mpx.c): Remove.
1873 (i386-mpx-linux.c): Remove.
1874 (i386-avx-mpx-avx512-pku.c): Remove.
1875 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1876 (i386-avx-mpx.c): Remove.
1877 (i386-avx-mpx-linux.c): Remove.
1878 (i386-mmx.c): Remove.
1879 (i386-mmx-linux.c): Remove.
1880 (reg-ia64.c): Remove.
1881 (reg-m32r.c): Remove.
1882 (reg-m68k.c): Remove.
1883 (reg-cf.c): Remove.
1884 (mips-linux.c): Remove.
1885 (mips-dsp-linux.c): Remove.
1886 (mips64-linux.c): Remove.
1887 (mips64-dsp-linux.c): Remove.
1888 (nios2-linux.c): Remove.
1889 (powerpc-32.c): Remove.
1890 (powerpc-32l.c): Remove.
1891 (powerpc-altivec32l.c): Remove.
1892 (powerpc-cell32l.c): Remove.
1893 (powerpc-vsx32l.c): Remove.
1894 (powerpc-isa205-32l.c): Remove.
1895 (powerpc-isa205-altivec32l.c): Remove.
1896 (powerpc-isa205-vsx32l.c): Remove.
1897 (powerpc-e500l.c): Remove.
1898 (powerpc-64l.c): Remove.
1899 (powerpc-altivec64l.c): Remove.
1900 (powerpc-cell64l.c): Remove.
1901 (powerpc-vsx64l.c): Remove.
1902 (powerpc-isa205-64l.c): Remove.
1903 (powerpc-isa205-altivec64l.c): Remove.
1904 (powerpc-isa205-vsx64l.c): Remove.
1905 (s390-linux32.c): Remove.
1906 (s390-linux32v1.c): Remove.
1907 (s390-linux32v2.c): Remove.
1908 (s390-linux64.c): Remove.
1909 (s390-linux64v1.c): Remove.
1910 (s390-linux64v2.c): Remove.
1911 (s390-te-linux64.c): Remove.
1912 (s390-vx-linux64.c): Remove.
1913 (s390-tevx-linux64.c): Remove.
1914 (s390x-linux64.c): Remove.
1915 (s390x-linux64v1.c): Remove.
1916 (s390x-linux64v2.c): Remove.
1917 (s390x-te-linux64.c): Remove.
1918 (s390x-vx-linux64.c): Remove.
1919 (s390x-tevx-linux64.c): Remove.
1920 (tic6x-c64xp-linux.c): Remove.
1921 (tic6x-c64x-linux.c): Remove.
1922 (tic6x-c62x-linux.c): Remove.
1923 (reg-sh.c): Remove.
1924 (reg-sparc64.c): Remove.
1925 (reg-spu.c): Remove.
1926 (amd64.c): Remove.
1927 (amd64-linux.c): Remove.
1928 (amd64-avx.c): Remove.
1929 (amd64-avx-linux.c): Remove.
1930 (amd64-avx-avx512.c): Remove.
1931 (amd64-avx-avx512-linux.c): Remove.
1932 (amd64-mpx.c): Remove.
1933 (amd64-mpx-linux.c): Remove.
1934 (amd64-avx-mpx-avx512-pku.c): Remove.
1935 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1936 (amd64-avx-mpx.c): Remove.
1937 (amd64-avx-mpx-linux.c): Remove.
1938 (x32.c): Remove.
1939 (x32-linux.c): Remove.
1940 (x32-avx.c): Remove.
1941 (x32-avx-linux.c): Remove.
1942 (x32-avx-avx512.c): Remove.
1943 (x32-avx-avx512-linux.c): Remove.
1944 (reg-xtensa.c): Remove.
1945 (reg-tilegx.c): Remove.
1946 (reg-tilegx32.c): Remove.
1947
1672e0d9
SDJ
19482017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1949
1950 * Makefile.in (SFILES): Add "common/environ.c".
1951 (OBJS): Add "common/environ.h".
1952
239b6d10
WT
19532017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1954
1955 * configure.ac: Check if the fs_base and gs_base members of
1956 `struct user_regs_struct' exist.
1957 * config.in: Regenerated.
1958 * configure: Likewise.
1959
694b382c
AT
19602017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1961
1962 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1963 target_read_memory.
1964 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1965 (get_next_pcs_syscall_next_pc): Likewise.
1966
7dc53023
LM
19672016-12-23 Luis Machado <lgustavo@codesourcery.com>
1968
1969 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1970 * nto-x86-low.c: Likewise.
1971
ad02e4fe
SM
19722016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1973
1974 * Makefile.in: Include disable-implicit-rules.mk.
1975
dcb07cfa
PA
19762016-11-23 Pedro Alves <palves@redhat.com>
1977
1978 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1979 (debug_vprintf): Use std::chrono::steady_clock instead of
1980 gettimeofday. Use '.' instead of ':'.
1981 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1982 (get_timestamp): Use std::chrono::steady_clock instead of
1983 gettimeofday.
1984
8629c02c
SM
19852016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1986
1987 * Makefile.in: Fix whitespace formatting.
1988
b593ecca
SM
19892016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1990
1991 * Makefile.in (SFILES, OBS): Flatten list and order
1992 alphabetically.
1993
9986ba08
PA
19942016-11-23 Pedro Alves <palves@redhat.com>
1995
1996 * event-loop.c (handle_file_event): Use warning.
1997 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1998 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1999 Use warning.
2000
4eefa7bc
PA
20012016-11-23 Pedro Alves <palves@redhat.com>
2002
2003 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2004 output.
2005 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2006 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2007 debug_printf and debug_flush for debug output.
2008 * server.c (handle_general_set): Likewise.
2009 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2010 output.
2011
5443506e
SM
20122016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2013
2014 * Makefile.in (.c.o): Replace rule with ...
2015 (%.o: %.c): ... this one.
2016
3b165252
SM
20172016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2018
2019 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2020 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2021 make.
2022 * configure.ac: Remove checks for the make program.
2023 * configure: Re-generate.
2024
0bcda685
PA
20252016-10-28 Pedro Alves <palves@redhat.com>
2026
2027 * Makefile.in (CXX_DIALECT): Get from configure.
2028 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2029 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2030 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2031 * config.in: Regenerate.
2032 * configure: Regenerate.
2033
c3805894
YQ
20342016-10-27 Yao Qi <yao.qi@linaro.org>
2035
2036 * linux-low.c (linux_supports_range_stepping): Return true if
2037 can_software_single_step return true.
2038
89342618
YQ
20392016-10-27 Yao Qi <yao.qi@linaro.org>
2040
2041 * inferiors.c (find_inferior_in_random): New function.
2042 * inferiors.h (find_inferior_in_random): Declare.
2043 * linux-low.c (linux_wait_for_event_filtered): Call
2044 find_inferior_in_random instead of find_inferior.
2045
e3652c84
YQ
20462016-10-27 Yao Qi <yao.qi@linaro.org>
2047
2048 * linux-low.c (linux_wait_1): If single-step breakpoints are
2049 inserted, remove them.
2050
5a04c4cf
PA
20512016-10-26 Pedro Alves <palves@redhat.com>
2052
2053 * linux-low.c (handle_extended_wait): Link parent/child fork
2054 threads.
2055 (linux_wait_1): Unlink them.
2056 (linux_set_resume_request): Ignore resume requests for
2057 already-resumed and unhandled fork child threads.
2058 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2059 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2060 New functions.
2061 (handle_v_requests) <vCont>: Don't call require_running.
2062 * server.h (in_queued_stop_replies): New declaration.
2063
cb93dc7f
YQ
20642016-10-24 Yao Qi <yao.qi@linaro.org>
2065
2066 PR server/20733
2067 * linux-aarch64-low.c (append_insns): Cast the return value to
2068 'uint32_t *'.
2069
a1078bea
YQ
20702016-10-10 Yao Qi <yao.qi@linaro.org>
2071
2072 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2073
1fb77080
SDJ
20742016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2075
2076 * target.c (target_supports_multi_process): New function, moved
2077 from...
2078 * target.h (target_supports_multi_process): ... here. Remove
2079 macro.
2080
39b5a3b9
TT
20812016-10-05 Tom Tromey <tom@tromey.com>
2082
2083 PR remote/20655:
2084 * tracepoint.c (handle_tracepoint_bkpts): Check
2085 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2086
c1d0b70a
YQ
20872016-10-05 Yao Qi <yao.qi@linaro.org>
2088
2089 * configure.srv: Update the path of arm-*.xml files.
2090
0a69eedb
YQ
20912016-10-05 Terry Guo <terry.guo@arm.com>
2092 Yao Qi <yao.qi@linaro.org>
2093
2094 * Makefile.in: Adjust the path of rules.
2095 * configure.srv: Update the path of xml files.
2096 * regformats/arm-with-iwmmxt.dat: Regenerated.
2097 * regformats/arm-with-neon.dat: Likewise.
2098 * regformats/arm-with-vfpv2.dat: Likewise.
2099 * regformats/arm-with-vfpv3.dat Likewise.
2100
17e16485
YQ
21012016-09-30 Yao Qi <yao.qi@linaro.org>
2102
2103 PR gdbserver/20627
2104 * target.c (target_stop_and_wait): Don't call
2105 target_continue_no_signal, use resume_stop instead.
2106
edeeb602
YQ
21072016-09-26 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-low.c (linux_wait_1): Call debug_exit.
2110
503b1c39
PA
21112016-09-23 Pedro Alves <palves@redhat.com>
2112
2113 * Makefile.in (SFILES): Add common/new-op.c.
2114 (OBS): Add common/new-op.o.
2115 (new-op.o): New rule.
2116
74172ecf
SM
21172016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * .gitinore: Ignore more files.
2120
fc6cda2e
YQ
21212016-09-21 Yao Qi <yao.qi@linaro.org>
2122
2123 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2124 23.
2125
bc1e6c81
SDJ
21262016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2127
2128 * server.c (start_inferior): Call target_mourn_inferior instead of
2129 mourn_inferior; pass ptid_t argument to it.
2130 (resume): Likewise.
2131 (handle_target_event): Likewise.
2132 * target.c (target_mourn_inferior): New function.
2133 * target.h (mourn_inferior): Delete macro.
2134
0e00e962
AA
21352016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2136
2137 * linux-low.c (lwp_is_stepping): New function.
2138
1d8cb77d
CL
21392016-09-06 Carl Love <cel@us.ibm.com>
2140
2141 * server.c (start_inferior): Fixed comment, requested comment change
2142 didn't get updated correctly. Removed reference to ptrace () call as
2143 it is only true on Linux systems.
2144
7313bced
CL
21452016-09-06 Carl Love <cel@us.ibm.com>
2146
2147 * server.c (start_inferior): Do not call
2148 function target_post_create_inferior () if the
2149 inferior process has already exited.
2150
cf6de44d
PA
21512016-09-05 Pedro Alves <palves@redhat.com>
2152
2153 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2154 (COMPILE.pre, CC_LD): Use CXX directly.
2155 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2156 * acinclude.m4: Don't include build-with-cxx.m4.
2157 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2158 * configure: Regenerate.
2159
c1da6748
AT
21602016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2161
2162 PR gdb/19495
2163 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2164 call writing data to own_buf.
2165
f2b9e3df
SDJ
21662016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2167
2168 * target.c (mywait): Call target_wait instead of
2169 the_target->wait.
2170 (target_wait): New function.
2171
049a8570
SDJ
21722016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2173
2174 * server.c (start_inferior): New variable 'ptid'. Replace calls
2175 to the_target->resume by target_continue{,_no_signal}, depending
2176 on the case.
2177 * target.c (target_stop_and_wait): Call target_continue_no_signal
2178 instead of the_target->resume.
2179 (target_continue): New function.
2180
3aa5cfa0
AT
21812016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2182
2183 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2184
754653a7
AZ
21852016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2186
2187 PR server/20491
2188 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2189 ps_prochandle.
2190 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2191 * linux-arm-low.c (ps_get_thread_area): Likewise.
2192 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2193 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2194 * linux-mips-low.c (ps_get_thread_area): Likewise.
2195 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2196 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2197 * linux-x86-low.c (ps_get_thread_area): Likewise.
2198 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2199
ed036b40
PA
22002016-08-19 Pedro Alves <palves@redhat.com>
2201
2202 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2203
c8ef42ee
PA
22042016-08-19 Pedro Alves <palves@redhat.com>
2205
2206 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2207 comment. Use memcpy instead of casting through unsigned long.
2208
9c235a72
PA
22092016-08-19 Pedro Alves <palves@redhat.com>
2210
2211 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2212 allocating around 0x80000000.
2213
201506da
PA
22142016-08-19 Pedro Alves <palves@redhat.com>
2215
2216 PR gdb/20415
2217 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2218 (x32-avx512-linux-ipa.o): New rules.
2219 * configure.ac (x86_64-*-linux*): New x32 check.
2220 * configure.srv (ipa_x32_linux_regobj): New.
2221 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2222 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2223 descriptions.
2224 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2225 descriptions.
2226 * configure: Regenerate.
2227
f348d89a
PA
22282016-08-09 Pedro Alves <palves@redhat.com>
2229
2230 PR gdb/18653
2231 * Makefile.in (OBS): Add signals-state-save-restore.o.
2232 (signals-state-save-restore.o): New rule.
2233 * config.in: Regenerate.
2234 * configure: Regenerate.
2235 * linux-low.c: Include "signals-state-save-restore.h".
2236 (linux_create_inferior): Call
2237 restore_original_signals_state.
2238 * server.c: Include "dispositions-save-restore.h".
2239 (captured_main): Call save_original_signals_state.
2240
1baf5149
PA
22412016-08-05 Pedro Alves <palves@redhat.com>
2242
2243 * configure: Regenerate.
2244
fcd4a73d
YQ
22452016-08-04 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-low.c (regsets_fetch_inferior_registers): Check
2248 errno is ESRCH or not.
2249
979659d0
YQ
22502016-08-02 Yao Qi <yao.qi@linaro.org>
2251
2252 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2253 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2254 (thread_db_load_search): Update.
2255 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2256 td_ta_set_event and td_ta_event_getmsg.
2257
6598661d
PA
22582016-07-26 Pedro Alves <palves@redhat.com>
2259
2260 PR server/20414
2261 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2262 of unsigned long for 64-bit registers and use uint32_t instead of
2263 unsigned int for 32-bit registers.
2264
9cf12d57
PA
22652016-07-26 Pedro Alves <palves@redhat.com>
2266
2267 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2268 to 'ptrace'.
2269
305450ed
TT
22702016-07-21 Tom Tromey <tom@tromey.com>
2271
2272 * configure: Rebuild.
2273
2583da7c
YQ
22742016-07-21 Yao Qi <yao.qi@linaro.org>
2275
2276 * mem-break.c (find_gdb_breakpoint): Cast bp to
2277 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2278
21536b36
YQ
22792016-07-21 Yao Qi <yao.qi@linaro.org>
2280
2281 * server.c (handle_v_requests): Support s and S actions
2282 if target_supports_software_single_step return true.
2283
8901d193
YQ
22842016-07-21 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2287 is resume_step, call maybe_hw_step.
2288 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2289 and unstop them.
2290 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2291 breakpoints or not.
2292 (proceed_one_lwp): If resume request is resume_step, install
2293 reinsert breakpoints and call maybe_hw_step.
2294
0e9a339e
YQ
22952016-07-21 Yao Qi <yao.qi@linaro.org>
2296
2297 * linux-low.c (proceed_one_lwp): Declare.
2298 (linux_resume_one_thread): Remove local variable 'step'.
2299 Lift code enqueue signal. Call proceed_one_lwp instead of
2300 linux_resume_one_lwp.
2301
4281b351
YQ
23022016-07-21 Yao Qi <yao.qi@linaro.org>
2303
2304 * linux-low.c (linux_resume_one_thread): Call
2305 enqueue_pending_signal.
2306
984a2c04
YQ
23072016-07-21 Yao Qi <yao.qi@linaro.org>
2308
2309 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2310 * inferiors.c (do_restore_current_thread_cleanup): New function.
2311 (make_cleanup_restore_current_thread): Likewise.
2312 * linux-low.c (install_software_single_step_breakpoints): Call
2313 make_cleanup_restore_current_thread. Switch current_thread to
2314 thread.
2315
bec903c9
YQ
23162016-07-21 Yao Qi <yao.qi@linaro.org>
2317
2318 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2319 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2320 (clone_one_breakpoint): Likewise.
2321 (delete_reinsert_breakpoints): Change parameter to thread.
2322 Callers updated.
2323 (has_reinsert_breakpoints): Likewise.
2324 (uninsert_reinsert_breakpoints): Likewise.
2325 (reinsert_reinsert_breakpoints): Likewise.
2326 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2327 (delete_reinsert_breakpoints): Likewise.
2328 (reinsert_reinsert_breakpoints): Likewise.
2329 (uninsert_reinsert_breakpoints): Likewise.
2330 (has_reinsert_breakpoints): Likewise.
2331
63c40ec7
YQ
23322016-07-21 Yao Qi <yao.qi@linaro.org>
2333
2334 * inferiors.c (get_thread_process): Make parameter const.
2335 * inferiors.h (get_thread_process): Update declaration.
2336 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2337 Add new parameters child_thread and parent_thread. Callers
2338 updated.
2339 * mem-break.h (clone_all_breakpoints): Update declaration.
2340
9aa76cd0
YQ
23412016-07-21 Yao Qi <yao.qi@linaro.org>
2342
2343 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2344 <command_list, handler>: Remove.
2345 (struct gdb_breakpoint): New.
2346 (struct other_breakpoint): New.
2347 (struct reinsert_breakpoint): New.
2348 (is_gdb_breakpoint): New function.
2349 (any_persistent_commands): Update command_list if
2350 is_gdb_breakpoint returns true.
2351 (set_breakpoint): Create breakpoints according to their types.
2352 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2353 (set_gdb_breakpoint_1): Likewise.
2354 (set_gdb_breakpoint): Likewise.
2355 (clear_breakpoint_conditions): Change parameter type to
2356 'struct gdb_breakpoint *'.
2357 (clear_breakpoint_commands): Likewise.
2358 (clear_breakpoint_conditions_and_commands): Likewise.
2359 (add_condition_to_breakpoint): Likewise.
2360 (add_breakpoint_condition): Likewise.
2361 (add_commands_to_breakpoint): Likewise.
2362 (check_breakpoints): Check other_breakpoint.
2363 (clone_one_breakpoint): Clone breakpopint according to its type.
2364 * mem-break.h (struct gdb_breakpoint): Declare.
2365 (set_gdb_breakpoint): Update declaration.
2366 (clear_breakpoint_conditions_and_commands): Likewise.
2367 (add_breakpoint_condition): Likewise.
2368 (add_breakpoint_commands): Likewise.
2369 * server.c (process_point_options): Change parameter type to
2370 'struct gdb_breakpoint *'.
2371
811f8301
YQ
23722016-07-21 Yao Qi <yao.qi@linaro.org>
2373
2374 * mem-break.c (set_breakpoint_at): Rename it to ...
2375 (set_breakpoint_type_at): ... it.
2376 (set_breakpoint_at): Call set_breakpoint_type_at.
2377 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2378 * mem-break.h (set_breakpoint_at): Update comments.
2379
b1c51e36
CLT
23802016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2381
2382 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2383 to buf parameter.
2384 (nios2_store_gregset): Likewise.
2385
ced2dffb
PA
23862016-07-01 Pedro Alves <palves@redhat.com>
2387 Antoine Tremblay <antoine.tremblay@ericsson.com>
2388
2389 * linux-low.c: Change interface to take the target lwp_info
2390 pointer directly and return void. Handle detaching from a zombie
2391 thread.
2392 (linux_detach_lwp_callback): New function.
2393 (linux_detach): Detach from the leader thread after detaching from
2394 the clone threads.
2395
2ac09a5b
YQ
23962016-06-28 Yao Qi <yao.qi@linaro.org>
2397
2398 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2399 for variable new_offset.
2400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2401 (aarch64_ftrace_insn_reloc_cb): Likewise.
2402 (aarch64_ftrace_insn_reloc_tb): Likewise.
2403 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2404 PRIx64 instead of PRIx32.
2405
79e7fd4f
YQ
24062016-06-28 Yao Qi <yao.qi@linaro.org>
2407
2408 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2409 (the_low_target): Install arm_get_syscall_trapinfo.
2410
061fc021
YQ
24112016-06-28 Yao Qi <yao.qi@linaro.org>
2412
2413 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2414 function.
2415 (the_low_target): Install aarch64_get_syscall_trapinfo.
2416
4cc32bec
YQ
24172016-06-28 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2420 Callers updated.
2421 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2422 Remove parameter sysno.
2423 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2424 sysret.
2425
782c1122
AA
24262016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2427
2428 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2429 (s390_emit_ne_goto): Likewise.
2430 (s390_emit_lt_goto): Likewise.
2431 (s390_emit_le_goto): Likewise.
2432 (s390_emit_gt_goto): Likewise.
2433 (s390_emit_ge_goto): Likewise.
2434 (s390x_emit_eq_goto): Likewise.
2435 (s390x_emit_ne_goto): Likewise.
2436 (s390x_emit_lt_goto): Likewise.
2437 (s390x_emit_le_goto): Likewise.
2438 (s390x_emit_gt_goto): Likewise.
2439 (s390x_emit_ge_goto): Likewise.
2440 (s390_emit_ops_impl): Mark variable static.
2441 (s390x_emit_ops): Likewise.
2442
2e7b624b
YQ
24432016-06-17 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-low.c (handle_extended_wait): Call
2446 uninsert_reinsert_breakpoints for the parent process. Remove
2447 reinsert breakpoints from the child process. Reinsert them to
2448 the parent process when vfork is done.
2449 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2450 (reinsert_reinsert_breakpoints): New function.
2451 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2452 (reinsert_reinsert_breakpoints): Declare.
2453
8a81c5d7
YQ
24542016-06-17 Yao Qi <yao.qi@linaro.org>
2455
2456 * linux-low.c (handle_extended_wait): If the parent is doing
2457 step-over, remove the reinsert breakpoints from the forked child.
2458
f50bf8e5
YQ
24592016-06-17 Yao Qi <yao.qi@linaro.org>
2460
2461 * linux-low.c (unsuspend_all_lwps): Declare.
2462 (linux_low_filter_event): If thread exited, call finish_step_over.
2463 If step-over is finished, unsuspend other threads.
2464
8376a3cb
YQ
24652016-06-17 Yao Qi <yao.qi@linaro.org>
2466
2467 * linux-low.c (linux_resume_one_lwp_throw): Assert
2468 has_reinsert_breakpoints returns false.
2469 * mem-break.c (delete_disabled_breakpoints): Assert
2470 bp type isn't reinsert_breakpoint.
2471
f79b145d
YQ
24722016-06-17 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-low.c (maybe_hw_step): New function.
2475 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2476 (finish_step_over): Switch current_thread to lwp temporarily,
2477 and assert has_reinsert_breakpoints returns true.
2478 (proceed_one_lwp): Call maybe_hw_step.
2479 * mem-break.c (has_reinsert_breakpoints): New function.
2480 * mem-break.h (has_reinsert_breakpoints): Declare.
2481
0ae534d2
JT
24822016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2483
2484 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2485
fcdad592
YQ
24862016-05-17 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2489 instead of find_inferior.
2490
9e784964
YQ
24912016-05-05 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2494 Initialize res to zero.
2495
cf2ebb6e
YQ
24962016-05-05 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2499 to uint32_t.
2500
c1aebf87
UW
25012016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2502
2503 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2504 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2505 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2506
35fd2deb 25072016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2508 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2509
2510 * tracepoint.c (write_inferior_int8): New function.
2511 (cmd_qtenable_disable): Write enable flag using
2512 write_inferior_int8.
2513
484b3c32
YQ
25142016-04-25 Yao Qi <yao.qi@linaro.org>
2515
2516 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2517 (need_step_over_p): Return zero if the LWP has pending signals
2518 can be delivered on software single step target.
2519
85ba7d86
YQ
25202016-04-25 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2523 return instead of error.
2524
3539aa13
YQ
25252016-04-22 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2528 to 23.
2529
5b061e98
YQ
25302016-04-22 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2533 signal when stepping over breakpoint with software single
2534 step.
2535
3451269c
PA
25362016-04-21 Pedro Alves <palves@redhat.com>
2537
2538 * linux-s390-low.c (s390_collect_ptrace_register)
2539 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2540 add casts.
2541 (s390_check_regset): Use void * instead of gdb_byte *.
2542
a2358508
PA
25432016-04-20 Pedro Alves <palves@redhat.com>
2544
2545 * configure: Renegerate.
2546
6885166d
YQ
25472016-04-20 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2550 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2551 number 16.
2552 (arm_store_gregset): Likewise.
2553
2b863f51
WT
25542016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2555
2556 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2557 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2558 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2559 (amd64-avx-mpx-linux.c): New rules.
2560 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2561 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2562 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2563 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2564 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2565 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2566 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2567 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2569 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2570 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2571 * linux-x86-low.c (x86_linux_read_description): Add case for
2572 X86_XSTATE_AVX_MPX_MASK.
2573 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2574 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2575 init_registers_i386_avx_mpx_linux.
2576 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2577 (initialize_low_tracepoint): Call
2578 init_registers_i386_avx_mpx_linux.
2579 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2580 (initialize_low_tracepoint): Call
2581 init_registers_amd64_avx_mpx_linux.
2582 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2583 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2584 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2585 declarations.
2586
9b30624b
PA
25872016-04-18 Pedro Alves <palves@redhat.com>
2588
2589 * configure: Regenerate.
2590
45e3745e
AT
25912016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2592
2593 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2594 (aarch64_emit_sub): Likewise.
2595
2afc13ff
PA
25962016-04-12 Pedro Alves <palves@redhat.com>
2597
2598 * utils.c (prepare_to_throw_exception): Delete.
2599
6e774b13
SM
26002016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2601
2602 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2603
4dca19f8
MK
26042016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2605
2606 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2607
d0a9981f
MK
26082016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2609
2610 * linux-aarch64-ipa.c: Add <elf.h> include.
2611 * linux-ppc-ipa.c: Add <elf.h> include.
2612 * linux-s390-ipa.c: Add <elf.h> include.
2613
252db07e
MK
26142016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2615
2616 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2617 (get_raw_reg_ptr): Likewise.
2618 (get_trace_state_variable_value_ptr): Likewise.
2619 (set_trace_state_variable_value_ptr): Likewise.
2620 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2621 char *.
2622
14e2b6d9
MK
26232016-03-31 Wei-cheng Wang <cole945@gmail.com>
2624 Marcin Kościelnicki <koriakin@0x04.net>
2625
2626 PR/17221
2627 * linux-ppc-low.c (emit_insns): New function.
2628 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2629 (ppc_emit_prologue): New function.
2630 (ppc_emit_epilogue): New function.
2631 (ppc_emit_add): New function.
2632 (ppc_emit_sub): New function.
2633 (ppc_emit_mul): New function.
2634 (ppc_emit_lsh): New function.
2635 (ppc_emit_rsh_signed): New function.
2636 (ppc_emit_rsh_unsigned): New function.
2637 (ppc_emit_ext): New function.
2638 (ppc_emit_zero_ext): New function.
2639 (ppc_emit_log_not): New function.
2640 (ppc_emit_bit_and): New function.
2641 (ppc_emit_bit_or): New function.
2642 (ppc_emit_bit_xor): New function.
2643 (ppc_emit_bit_not): New function.
2644 (ppc_emit_equal): New function.
2645 (ppc_emit_less_signed): New function.
2646 (ppc_emit_less_unsigned): New function.
2647 (ppc_emit_ref): New function.
2648 (ppc_emit_const): New function.
2649 (ppc_emit_reg): New function.
2650 (ppc_emit_pop): New function.
2651 (ppc_emit_stack_flush): New function.
2652 (ppc_emit_swap): New function.
2653 (ppc_emit_stack_adjust): New function.
2654 (ppc_emit_call): New function.
2655 (ppc_emit_int_call_1): New function.
2656 (ppc_emit_void_call_2): New function.
2657 (ppc_emit_if_goto): New function.
2658 (ppc_emit_goto): New function.
2659 (ppc_emit_eq_goto): New function.
2660 (ppc_emit_ne_goto): New function.
2661 (ppc_emit_lt_goto): New function.
2662 (ppc_emit_le_goto): New function.
2663 (ppc_emit_gt_goto): New function.
2664 (ppc_emit_ge_goto): New function.
2665 (ppc_write_goto_address): New function.
2666 (ppc_emit_ops_impl): New static variable.
2667 (ppc64v1_emit_prologue): New function.
2668 (ppc64v2_emit_prologue): New function.
2669 (ppc64_emit_epilogue): New function.
2670 (ppc64_emit_add): New function.
2671 (ppc64_emit_sub): New function.
2672 (ppc64_emit_mul): New function.
2673 (ppc64_emit_lsh): New function.
2674 (ppc64_emit_rsh_signed): New function.
2675 (ppc64_emit_rsh_unsigned): New function.
2676 (ppc64_emit_ext): New function.
2677 (ppc64_emit_zero_ext): New function.
2678 (ppc64_emit_log_not): New function.
2679 (ppc64_emit_bit_and): New function.
2680 (ppc64_emit_bit_or): New function.
2681 (ppc64_emit_bit_xor): New function.
2682 (ppc64_emit_bit_not): New function.
2683 (ppc64_emit_equal): New function.
2684 (ppc64_emit_less_signed): New function.
2685 (ppc64_emit_less_unsigned): New function.
2686 (ppc64_emit_ref): New function.
2687 (ppc64_emit_const): New function.
2688 (ppc64v1_emit_reg): New function.
2689 (ppc64v2_emit_reg): New function.
2690 (ppc64_emit_pop): New function.
2691 (ppc64_emit_stack_flush): New function.
2692 (ppc64_emit_swap): New function.
2693 (ppc64v1_emit_call): New function.
2694 (ppc64v2_emit_call): New function.
2695 (ppc64v1_emit_int_call_1): New function.
2696 (ppc64v2_emit_int_call_1): New function.
2697 (ppc64v1_emit_void_call_2): New function.
2698 (ppc64v2_emit_void_call_2): New function.
2699 (ppc64_emit_if_goto): New function.
2700 (ppc64_emit_eq_goto): New function.
2701 (ppc64_emit_ne_goto): New function.
2702 (ppc64_emit_lt_goto): New function.
2703 (ppc64_emit_le_goto): New function.
2704 (ppc64_emit_gt_goto): New function.
2705 (ppc64_emit_ge_goto): New function.
2706 (ppc64v1_emit_ops_impl): New static variable.
2707 (ppc64v2_emit_ops_impl): New static variable.
2708 (ppc_emit_ops): New function.
2709 (linux_low_target): Wire in ppc_emit_ops.
2710
a2174ba4
MK
27112016-03-31 Wei-cheng Wang <cole945@gmail.com>
2712 Marcin Kościelnicki <koriakin@0x04.net>
2713
2714 PR/17221
2715 * Makefile.in: Add powerpc-*-ipa.o
2716 * configure.srv: Add ipa_obj for powerpc*-linux.
2717 * linux-ppc-ipa.c: New file.
2718 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2719 includes.
2720 (PPC_FIELD): New macro.
2721 (PPC_SEXT): New macro.
2722 (PPC_OP6): New macro.
2723 (PPC_BO): New macro.
2724 (PPC_LI): New macro.
2725 (PPC_BD): New macro.
2726 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2727 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2728 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2729 (ppc_get_thread_area): New function.
2730 (is_elfv2_inferior): New function.
2731 (gen_ds_form): New function.
2732 (GEN_STD): New macro.
2733 (GEN_STDU): New macro.
2734 (GEN_LD): New macro.
2735 (GEN_LDU): New macro.
2736 (gen_d_form): New function.
2737 (GEN_ADDI): New macro.
2738 (GEN_ADDIS): New macro.
2739 (GEN_LI): New macro.
2740 (GEN_LIS): New macro.
2741 (GEN_ORI): New macro.
2742 (GEN_ORIS): New macro.
2743 (GEN_LWZ): New macro.
2744 (GEN_STW): New macro.
2745 (GEN_STWU): New macro.
2746 (gen_xfx_form): New function.
2747 (GEN_MFSPR): New macro.
2748 (GEN_MTSPR): New macro.
2749 (GEN_MFCR): New macro.
2750 (GEN_MTCR): New macro.
2751 (GEN_SYNC): New macro.
2752 (GEN_LWSYNC): New macro.
2753 (gen_x_form): New function.
2754 (GEN_OR): New macro.
2755 (GEN_MR): New macro.
2756 (GEN_LWARX): New macro.
2757 (GEN_STWCX): New macro.
2758 (GEN_CMPW): New macro.
2759 (gen_md_form): New function.
2760 (GEN_RLDICL): New macro.
2761 (GEN_RLDICR): New macro.
2762 (gen_i_form): New function.
2763 (GEN_B): New macro.
2764 (GEN_BL): New macro.
2765 (gen_b_form): New function.
2766 (GEN_BNE): New macro.
2767 (GEN_LOAD): New macro.
2768 (GEN_STORE): New macro.
2769 (gen_limm): New function.
2770 (gen_atomic_xchg): New function.
2771 (gen_call): New function.
2772 (ppc_relocate_instruction): New function.
2773 (ppc_install_fast_tracepoint_jump_pad): New function.
2774 (ppc_get_min_fast_tracepoint_insn_len): New function.
2775 (ppc_get_ipa_tdesc_idx): New function.
2776 (the_low_target): Wire in the new functions.
2777 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2778 tdescs.
2779 * linux-ppc-tdesc.h: New file.
2780
a13c4696
MK
27812016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2782
2783 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2784 (alloc_jump_pad_buffer): New function.
2785 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2786 (alloc_jump_pad_buffer): New function.
2787 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2788 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2789 (alloc_jump_pad_buffer): New function.
2790 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2791 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2792 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2793 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2794
1cda1512
MK
27952016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2796
2797 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2798 * linux-amd64-ipa.c: Likewise.
2799 * linux-i386-ipa.c: Likewise.
2800 * linux-s390-ipa.c: Likewise.
2801 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2802 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2803 set_trace_state_variable_value_ptr.
2804 (struct ipa_sym_addresses): Likewise.
2805 (symbol_list): Likewise.
2806 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2807 accessing gdb_collect directly.
2808 (gdb_collect_ptr_type): New typedef.
2809 (get_raw_reg_ptr_type): New typedef.
2810 (get_trace_state_variable_value_ptr_type): New typedef.
2811 (set_trace_state_variable_value_ptr_type): New typedef.
2812 (gdb_collect_ptr): New global.
2813 (get_raw_reg_ptr): New global.
2814 (get_trace_state_variable_value_ptr): New global.
2815 (set_trace_state_variable_value_ptr): New global.
2816 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2817 accessing get_raw_reg directly.
2818 (get_get_tsv_func_addr): Likewise for
2819 get_trace_state_variable_value_ptr.
2820 (get_set_tsv_func_addr): Likewise for
2821 set_trace_state_variable_value_ptr.
2822 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2823
72fb5488
SM
28242016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2825
2826 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2827
28170b88
MK
28282016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2829
2830 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2831 packets.
2832 (relocate_instruction): Remove own_buf.
2833 * server.c (own_buf): Make global.
2834 (handle_v_requests): Make global.
2835 * server.h (own_buf): New declaration.
2836 (handle_v_requests): New prototype.
2837
f39e8743
MK
28382016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2839
2840 PR 18377
2841 * linux-s390-low.c (add_insns): New function.
2842 (s390_emit_prologue): New function.
2843 (s390_emit_epilogue): New function.
2844 (s390_emit_add): New function.
2845 (s390_emit_sub): New function.
2846 (s390_emit_mul): New function.
2847 (s390_emit_lsh): New function.
2848 (s390_emit_rsh_signed): New function.
2849 (s390_emit_rsh_unsigned): New function.
2850 (s390_emit_ext): New function.
2851 (s390_emit_log_not): New function.
2852 (s390_emit_bit_and): New function.
2853 (s390_emit_bit_or): New function.
2854 (s390_emit_bit_xor): New function.
2855 (s390_emit_bit_not): New function.
2856 (s390_emit_equal): New function.
2857 (s390_emit_less_signed): New function.
2858 (s390_emit_less_unsigned): New function.
2859 (s390_emit_ref): New function.
2860 (s390_emit_if_goto): New function.
2861 (s390_emit_goto): New function.
2862 (s390_write_goto_address): New function.
2863 (s390_emit_litpool): New function.
2864 (s390_emit_const): New function.
2865 (s390_emit_call): New function.
2866 (s390_emit_reg): New function.
2867 (s390_emit_pop): New function.
2868 (s390_emit_stack_flush): New function.
2869 (s390_emit_zero_ext): New function.
2870 (s390_emit_swap): New function.
2871 (s390_emit_stack_adjust): New function.
2872 (s390_emit_set_r2): New function.
2873 (s390_emit_int_call_1): New function.
2874 (s390_emit_void_call_2): New function.
2875 (s390_emit_eq_goto): New function.
2876 (s390_emit_ne_goto): New function.
2877 (s390_emit_lt_goto): New function.
2878 (s390_emit_le_goto): New function.
2879 (s390_emit_gt_goto): New function.
2880 (s390_emit_ge_goto): New function.
2881 (s390x_emit_prologue): New function.
2882 (s390x_emit_epilogue): New function.
2883 (s390x_emit_add): New function.
2884 (s390x_emit_sub): New function.
2885 (s390x_emit_mul): New function.
2886 (s390x_emit_lsh): New function.
2887 (s390x_emit_rsh_signed): New function.
2888 (s390x_emit_rsh_unsigned): New function.
2889 (s390x_emit_ext): New function.
2890 (s390x_emit_log_not): New function.
2891 (s390x_emit_bit_and): New function.
2892 (s390x_emit_bit_or): New function.
2893 (s390x_emit_bit_xor): New function.
2894 (s390x_emit_bit_not): New function.
2895 (s390x_emit_equal): New function.
2896 (s390x_emit_less_signed): New function.
2897 (s390x_emit_less_unsigned): New function.
2898 (s390x_emit_ref): New function.
2899 (s390x_emit_if_goto): New function.
2900 (s390x_emit_const): New function.
2901 (s390x_emit_call): New function.
2902 (s390x_emit_reg): New function.
2903 (s390x_emit_pop): New function.
2904 (s390x_emit_stack_flush): New function.
2905 (s390x_emit_zero_ext): New function.
2906 (s390x_emit_swap): New function.
2907 (s390x_emit_stack_adjust): New function.
2908 (s390x_emit_int_call_1): New function.
2909 (s390x_emit_void_call_2): New function.
2910 (s390x_emit_eq_goto): New function.
2911 (s390x_emit_ne_goto): New function.
2912 (s390x_emit_lt_goto): New function.
2913 (s390x_emit_le_goto): New function.
2914 (s390x_emit_gt_goto): New function.
2915 (s390x_emit_ge_goto): New function.
2916 (s390_emit_ops): New function.
2917 (struct linux_target_ops): Fill in emit_ops hook.
2918
abd9baf9
MK
29192016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2920
2921 PR 18377
2922 * Makefile.in: Add s390 IPA files.
2923 * configure.srv: Build IPA for s390.
2924 * linux-s390-ipa.c: New file.
2925 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2926 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2927 (tdesc_s390_linux32): Likewise.
2928 (init_registers_s390_linux32v1): Likewise.
2929 (tdesc_s390_linux32v1): Likewise.
2930 (init_registers_s390_linux32v2): Likewise.
2931 (tdesc_s390_linux32v2): Likewise.
2932 (init_registers_s390_linux64): Likewise.
2933 (tdesc_s390_linux64): Likewise.
2934 (init_registers_s390_linux64v1): Likewise.
2935 (tdesc_s390_linux64v1): Likewise.
2936 (init_registers_s390_linux64v2): Likewise.
2937 (tdesc_s390_linux64v2): Likewise.
2938 (init_registers_s390_te_linux64): Likewise.
2939 (tdesc_s390_te_linux64): Likewise.
2940 (init_registers_s390_vx_linux64): Likewise.
2941 (tdesc_s390_vx_linux64): Likewise.
2942 (init_registers_s390_tevx_linux64): Likewise.
2943 (tdesc_s390_tevx_linux64): Likewise.
2944 (init_registers_s390x_linux64): Likewise.
2945 (tdesc_s390x_linux64): Likewise.
2946 (init_registers_s390x_linux64v1): Likewise.
2947 (tdesc_s390x_linux64v1): Likewise.
2948 (init_registers_s390x_linux64v2): Likewise.
2949 (tdesc_s390x_linux64v2): Likewise.
2950 (init_registers_s390x_te_linux64): Likewise.
2951 (tdesc_s390x_te_linux64): Likewise.
2952 (init_registers_s390x_vx_linux64): Likewise.
2953 (tdesc_s390x_vx_linux64): Likewise.
2954 (init_registers_s390x_tevx_linux64): Likewise.
2955 (tdesc_s390x_tevx_linux64): Likewise.
2956 (have_hwcap_s390_vx): New static variable.
2957 (s390_arch_setup): Fill have_hwcap_s390_vx.
2958 (s390_get_thread_area): New function.
2959 (s390_ft_entry_gpr_esa): New const.
2960 (s390_ft_entry_gpr_zarch): New const.
2961 (s390_ft_entry_misc): New const.
2962 (s390_ft_entry_fr): New const.
2963 (s390_ft_entry_vr): New const.
2964 (s390_ft_main_31): New const.
2965 (s390_ft_main_64): New const.
2966 (s390_ft_exit_fr): New const.
2967 (s390_ft_exit_vr): New const.
2968 (s390_ft_exit_misc): New const.
2969 (s390_ft_exit_gpr_esa): New const.
2970 (s390_ft_exit_gpr_zarch): New const.
2971 (append_insns): New function.
2972 (s390_relocate_instruction): New function.
2973 (s390_install_fast_tracepoint_jump_pad): New function.
2974 (s390_get_min_fast_tracepoint_insn_len): New function.
2975 (s390_get_ipa_tdesc_idx): New function.
2976 (struct linux_target_ops): Wire in the above functions.
2977 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2978 * linux-s390-tdesc.h: New file.
2979
a4105d04
MK
29802016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2981
2982 * linux-s390-low.c (s390_supports_tracepoints): New function.
2983 (struct linux_target_ops): Fill supports_tracepoints hook.
2984
35ac8b3e
YQ
29852016-03-18 Yao Qi <yao.qi@linaro.org>
2986
2987 * linux-low.c (lwp_signal_can_be_delivered): New function.
2988 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2989
94610ec4
YQ
29902016-03-18 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2993 0 if signal is enqueued. Remove 'signal' from one debugging
2994 message. Move one debugging message to some lines below.
2995 Remove code setting 'signal' to 0.
2996
80aea927
YQ
29972016-03-18 Yao Qi <yao.qi@linaro.org>
2998
2999 * linux-low.c (linux_low_filter_event): Remove redundant
3000 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3001
b04fd3be
MK
30022016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3003
3004 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3005 (struct linux_target_ops): Wire in the above.
3006
c40c8d4b
YQ
30072016-03-03 Yao Qi <yao.qi@linaro.org>
3008
3009 * linux-low.c: Update comments to start_step_over.
3010
0f8288ae
YQ
30112016-03-03 Yao Qi <yao.qi@linaro.org>
3012
3013 PR server/19736
3014 * linux-low.c (handle_extended_wait): Set child suspended
3015 if event_lwp->bp_reinsert isn't zero.
3016
fdbd04a8
YQ
30172016-03-02 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3020 enqueue_pending_signal.
3021
6896a8fa
MK
30222016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3023
3024 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3025 is actually loaded.
3026
ab503087
MK
30272016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3028
3029 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3030 (s390_regmap_3264) [!__s390x__]: New global.
3031 (s390_collect_ptrace_register): Skip map entries containing -1.
3032 (s390_supply_ptrace_register): Ditto.
3033 (s390_fill_gprs_high): New function.
3034 (s390_store_gprs_high): New function.
3035 (s390_regsets): Add NT_S390_HIGH_GPRS.
3036 (s390_get_hwcap): Enable on 31-bit.
3037 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3038 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3039 Detect NT_S390_HIGH_GPRS.
3040 (s390_usrregs_info_3264): Enable on 31-bit.
3041 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3042 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3043
ae91f625
MK
30442016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3045
3046 PR gdb/13808
3047 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3048 * configure.srv: Ditto.
3049 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3050 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3051 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3052 (init_registers_amd64_linux): Remove prototype.
3053 (tdesc_amd64_linux): Remove declaration.
3054 (get_ipa_tdesc): New function.
3055 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3056 initialize remaining tdescs.
3057 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3058 (init_registers_i386_linux): Remove prototype.
3059 (tdesc_i386_linux): Remove declaration.
3060 (get_ipa_tdesc): New function.
3061 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3062 initialize remaining tdescs.
3063 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3064 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3065 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3066 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3067 (x86_get_ipa_tdesc_idx): New function.
3068 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3069 * linux-x86-tdesc.h: New file.
3070 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3071 (target_get_ipa_tdesc_idx): New macro.
3072 * tracepoint.c (ipa_tdesc_idx): New macro.
3073 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3074 (symbol_list): Add ipa_tdesc_idx.
3075 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3076 (ipa_tdesc): Remove.
3077 (ipa_tdesc_idx): New variable.
3078 (get_context_regcache): Use get_ipa_tdesc.
3079 (gdb_collect): Ditto.
3080 (gdb_probe): Ditto.
3081 * tracepoint.h (get_ipa_tdesc): New prototype.
3082 (ipa_tdesc): Remove.
3083
e7ad2f14
PA
30842016-02-24 Pedro Alves <palves@redhat.com>
3085
3086 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3087 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3088 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3089 Factor out common code between the USE_SIGTRAP_SIGINFO and
3090 !USE_SIGTRAP_SIGINFO blocks.
3091 (linux_low_filter_event): Call save_stop_reason instead of
3092 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3093 Update comments.
3094 (linux_wait_1): Update comments.
3095
657f9cde
WW
30962016-02-24 Wei-cheng Wang <cole945@gmail.com>
3097
3098 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3099 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3100 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3101 ppc_insert_point, ppc_remove_point.
3102
b00b61e1
MK
31032016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3104
3105 * linux-s390-low.c (s390_supports_z_point_type): New function.
3106 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3107
553cb527
YQ
31082016-02-16 Yao Qi <yao.qi@linaro.org>
3109
3110 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3111 PC. Get pc from regcache_read_pc.
3112
a5652c21
YQ
31132016-02-12 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3116 or linux_get_pc_32bit.
3117 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3118
ed443b61
YQ
31192016-02-12 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3122 arm_linux_get_next_pcs_fixup.
3123
020ecd38
MK
31242016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3125
3126 * tracepoint.c (x_tracepoint_action_download): Change
3127 write_inferior_data_ptr to write_inferior_data_pointer.
3128 (cmd_qtstart): Likewise.
3129 (write_inferior_data_ptr): Remove.
3130 (download_agent_expr): Change write_inferior_data_ptr to
3131 write_inferior_data_pointer.
3132 (download_tracepoint_1): Likewise.
3133 (download_tracepoint): Likewise.
3134 (download_trace_state_variables): Likewise.
3135
7cae9051
WW
31362016-02-11 Wei-cheng Wang <cole945@gmail.com>
3137 Marcin Kościelnicki <koriakin@0x04.net>
3138
3139 * tracepoint.c (struct tracepoint_action_ops): Remove.
3140 (struct tracepoint_action): Remove ops.
3141 (m_tracepoint_action_download, r_tracepoint_action_download)
3142 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3143 size and offset accordingly.
3144 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3145 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3146 (tracepoint_action_send, tracepoint_action_download): New functions.
3147 Helpers for trace action handlers.
3148 (add_tracepoint_action): Remove setup actions ops.
3149 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3150
9f6a71b4
YQ
31512016-02-10 Yao Qi <yao.qi@linaro.org>
3152
3153 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3154
1e94266c
SM
31552016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3156
3157 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3158 to AC_OUTPUT.
3159 * configure: Regenerate.
3160
8adce034
SM
31612016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3162
3163 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3164 void * to gdb_byte *.
3165 * linux-low.c (siginfo_fixup): Likewise.
3166 (linux_xfer_siginfo): Likewise.
3167 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3168 Likewise.
3169 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3170
93813b37
WT
31712016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3172
3173 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3174 to srv_tgtobj.
3175 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3176 to srv_tgtobj.
3177 * linux-x86-low.c [__x86_64__]: Include
3178 "nat/amd64-linux-siginfo.h".
3179 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3180 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3181 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3182 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3183 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3184 (cpt_si_fd, si_timerid, si_overrun): Move from
3185 nat/amd64-linux-siginfo.c.
3186 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3187
8424cc97
SM
31882016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3189
3190 * server.c (skip_to_semicolon): Remove.
3191 (process_point_options): Use strchrnul instead of
3192 skip_to_semicolon.
3193
4d18591b
YQ
31942016-01-26 Yao Qi <yao.qi@linaro.org>
3195
3196 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3197 * linux-low.c (install_software_single_step_breakpoints): Don't
3198 call regcache_read_pc.
3199 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3200 argument pc.
3201
d8020970
YQ
32022016-01-26 Yao Qi <yao.qi@linaro.org>
3203
3204 * linux-low.c (install_software_single_step_breakpoints): Call
3205 regcache_read_pc instead of get_pc.
3206
8b207339
YQ
32072016-01-26 Yao Qi <yao.qi@linaro.org>
3208
3209 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3210 (unblock_async_io): Rename to ...
3211 (block_unblock_async_io): ... it. New function.
3212 (enable_async_io): Don't install SIGIO handler. Unblock it
3213 instead.
3214 (disable_async_io): Don't ignore SIGIO. Block it instead.
3215 (initialize_async_io): Install SIGIO handler. Don't call
3216 unblock_async_io.
3217
18879fef
YQ
32182016-01-26 Yao Qi <yao.qi@linaro.org>
3219
3220 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3221 first character is '\003', call *the_target->request_interrupt.
3222
a0f8e08a
YQ
32232016-01-25 Yao Qi <yao.qi@linaro.org>
3224
3225 * remote-utils.c (new_thread_notify): Remove.
3226 (dead_thread_notify): Likewise.
3227 * remote-utils.h (new_thread_notify): Remove declaration.
3228 (dead_thread_notify): Likewise.
3229
cc5fd9ab
MK
32302016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3231
3232 * gdb.trace/pending.exp: Fix expected message on continue.
3233
99e8eb11
MK
32342016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3235
3236 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3237 it works properly on big-endian machines where sizeof (CORE_ADDR)
3238 != sizeof (void *).
3239
a994041d
PA
32402016-01-21 Pedro Alves <palves@redhat.com>
3241
3242 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3243 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3244 * configure: Regenerate.
3245
f7a6a40d
YQ
32462016-01-21 Yao Qi <yao.qi@linaro.org>
3247
3248 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3249 is_thumb and set it according to CPSR saved on the stack.
3250 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3251 arm_sigreturn_next_pc.
3252
6f69e520
YQ
32532016-01-18 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-low.c (linux_set_pc_64bit): New function.
3256 (linux_get_pc_64bit): New function.
3257 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3258 Declare.
3259 * linux-sparc-low.c (debug_threads): Remove declaration.
3260 (sparc_get_pc): Remove.
3261 (the_low_target): Use linux_get_pc_64bit instead of
3262 sparc_get_pc.
3263 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3264 (the_low_target): Use linux_get_pc_64bit and
3265 linux_set_pc_64bit.
3266
276d4552
YQ
32672016-01-18 Yao Qi <yao.qi@linaro.org>
3268
3269 * linux-arm-low.c (debug_threads): Remove declaration.
3270 (arm_get_pc, arm_set_pc): Remove.
3271 (the_low_target): Use linux_get_pc_32bit and
3272 linux_set_pc_32bit.
3273 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3274 (the_low_target): Use linux_get_pc_32bit and
3275 linux_set_pc_32bit.
3276 * linux-cris-low.c (debug_threads): Remove declaration.
3277 (cris_get_pc, cris_set_pc,): Remove.
3278 (the_low_target): Use linux_get_pc_32bit and
3279 linux_set_pc_32bit.
3280 * linux-crisv32-low.c (debug_threads): Remove declaration.
3281 (cris_get_pc, cris_set_pc): Remove.
3282 (the_low_target): Use linux_get_pc_32bit and
3283 linux_set_pc_32bit.
3284 * linux-low.c: Include inttypes.h.
3285 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3286 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3287 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3288 (the_low_target): Use linux_get_pc_32bit and
3289 linux_set_pc_32bit.
3290 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3291 (the_low_target): Use linux_get_pc_32bit and
3292 linux_set_pc_32bit.
3293 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3294 (the_low_target): Use linux_get_pc_32bit and
3295 linux_set_pc_32bit.
3296 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3297 (the_low_target): Use linux_get_pc_32bit and
3298 linux_set_pc_32bit.
3299 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3300 (the_low_target): Use linux_get_pc_32bit and
3301 linux_set_pc_32bit.
3302
eb0edac8
GB
33032016-01-18 Gary Benson <gbenson@redhat.com>
3304
3305 * configure.ac (AC_FUNC_FORK): New check.
3306 * config.in: Regenerate.
3307 * configure: Likewise.
3308
1b451dda
YQ
33092016-01-14 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3312 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3313 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3314 arm_get_next_pcs_ctor.
3315
82075af2
JS
33162016-01-12 Josh Stone <jistone@redhat.com>
3317 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3318
3319 * inferiors.h: Include "gdb_vecs.h".
3320 (struct process_info): Add syscalls_to_catch.
3321 * inferiors.c (remove_process): Free syscalls_to_catch.
3322 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3323 syscall_return stops.
3324 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3325 * server.c (handle_general_set): Handle QCatchSyscalls.
3326 (handle_query): Report support for QCatchSyscalls.
3327 * target.h (struct target_ops): Add supports_catch_syscall.
3328 (target_supports_catch_syscall): New macro.
3329 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3330 (struct lwp_info): Add syscall_state.
3331 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3332 Maintain syscall_state and syscalls_to_catch across exec.
3333 (get_syscall_trapinfo): New function, proxy to the_low_target.
3334 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3335 (linux_low_filter_event): Toggle syscall_state entry/return for
3336 syscall traps, and set it ignored for all others.
3337 (gdb_catching_syscalls_p): New function.
3338 (gdb_catch_this_syscall_p): New function.
3339 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3340 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3341 (linux_supports_catch_syscall): New function.
3342 (linux_target_ops): Install it.
3343 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3344 (the_low_target): Install it.
3345
8f13a3ce
MF
33462016-01-12 Mike Frysinger <vapier@gentoo.org>
3347
3348 * acinclude.m4: Include new ../warning.m4 file.
3349 * configure: Regenerated.
3350 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3351
5b3da067
MF
33522016-01-12 Mike Frysinger <vapier@gentoo.org>
3353
3354 * ax.c (is_goto_target): Mark static.
3355 * linux-low.c (register_addr): Likewise.
3356 (linux_fetch_registers, linux_store_registers): Likewise.
3357 * mem-break.c (any_persistent_commands): Fix old prototype.
3358 (add_commands_to_breakpoint): Mark static.
3359 * regcache.c (find_register_by_name): Delete unused func.
3360 * remote-utils.c (hex_or_minus_one): Mark static.
3361 * server.c (monitor_show_help): Mark static.
3362 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3363 handle_v_requests): Likewise.
3364
bc504a31
PA
33652016-01-12 Pedro Alves <palves@redhat.com>
3366
3367 Remove use of the registered trademark symbol throughout.
3368
5a0dd67a
YQ
33692016-01-08 Yao Qi <yao.qi@linaro.org>
3370
3371 * remote-utils.c (getpkt): If c is '\003', call target hook
3372 request_interrupt.
3373
b2ca446f
YQ
33742016-01-06 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3377 linux-aarch32-low.c.
3378 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3379 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3380 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3381 (thumb2_breakpoint): Declare.
3382 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3383 linux-aarch32-low.h.
3384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3385 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3386 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3387
edd88788
JB
33882016-01-01 Joel Brobecker <brobecker@adacore.com>
3389
3390 * gdbreplay.c (gdbreplay_version): Change copyright year in
3391 version message.
3392 * server.c (gdbserver_version): Likewise.
3393
65da7f14
PP
33942015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3395
3396 * server.c (crc32_table): Delete.
3397 (crc32): Use libiberty's xcrc32 function.
3398
4abd5ed2
JB
33992015-12-22 Joel Brobecker <brobecker@adacore.com>
3400
3401 * lynx-low.c (lynx_delete_thread_callback): New function.
3402 (lynx_mourn): Properly delete our process and all of its
3403 threads. Remove call to clear_inferiors.
3404
0e50fe5c
JB
34052015-12-22 Joel Brobecker <brobecker@adacore.com>
3406
3407 * target.c (thread_search_callback): Add check that
3408 the thread_stopped target callback is not NULL before
3409 calling it.
3410
35adc03f
YQ
34112015-12-21 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3414 arm breakpoint.
3415
bd2b2909
AT
34162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3417
3418 * server.c (handle_query): Call target_supports_software_single_step.
3419
7fe5e27e
AT
34202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421
3422 * linux-low.c (single_step): New function.
3423 (linux_resume_one_lwp_throw): Call single_step.
3424 (start_step_over): Likewise.
3425
d9311bfa
AT
34262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3427
3428 * Makefile.in (SFILES): Append arch/arm-linux.c,
3429 arch/arm-get-next-pcs.c.
3430 (arm-linux.o): New rule.
3431 (arm-get-next-pcs.o): New rule.
3432 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3433 arm-linux.o.
3434 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3435 to linux-aarch32-low.c.
3436 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3437 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3438 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3439 (thumb2_breakpoint_len): Likewise.
3440 (arm_is_thumb_mode): Make non-static.
3441 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3442 from linux-aarch32-low.c.
3443 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3444 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3445 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3446 (thumb2_breakpoint_len): Likewise.
3447 (arm_is_thumb_mode): New declaration.
3448 * linux-arm-low.c: Include arch/arm-linux.h
3449 aarch/arm-get-next-pcs.h, sys/syscall.h.
3450 (get_next_pcs_ops): New struct.
3451 (get_next_pcs_addr_bits_remove): New function.
3452 (get_next_pcs_is_thumb): New function.
3453 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3454 (arm_sigreturn_next_pc): Likewise.
3455 (get_next_pcs_syscall_next_pc): Likewise.
3456 (arm_gdbserver_get_next_pcs): Likewise.
3457 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3458 Initialize.
3459 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3460 * server.h: Include gdb_vecs.h.
3461
68ce2059
AT
34622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3463
3464 * Makefile.in (SFILES): Append common/common-regcache.c.
3465 (OBS): Append common-regcache.o.
3466 (common-regcache.o): New rule.
3467 * regcache.c (init_register_cache): Initialize cache to
3468 REG_UNAVAILABLE.
3469 (regcache_raw_read_unsigned): New function.
3470 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3471 register_status enum.
3472
fa5308bd
AT
34732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3474
3475 * linux-aarch64-low.c (the_low_targets): Rename
3476 breakpoint_reinsert_addr to get_next_pcs.
3477 * linux-arm-low.c (the_low_targets): Likewise.
3478 * linux-bfin-low.c (the_low_targets): Likewise.
3479 * linux-cris-low.c (the_low_targets): Likewise.
3480 * linux-crisv32-low.c (the_low_targets): Likewise.
3481 * linux-low.c (can_software_single_step): Likewise.
3482 (install_software_single_step_breakpoints): New function.
3483 (start_step_over): Use install_software_single_step_breakpoints.
3484 * linux-low.h: New CORE_ADDR vector.
3485 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3486 get_next_pcs.
3487 * linux-mips-low.c (the_low_targets): Likewise.
3488 * linux-nios2-low.c (the_low_targets): Likewise.
3489 * linux-sparc-low.c (the_low_targets): Likewise.
3490
4a6ed09b
PA
34912015-12-17 Pedro Alves <palves@redhat.com>
3492
3493 * linux-low.c (linux_kill_one_lwp): Remove references to
3494 LinuxThreads.
3495 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3496 to 'kill'.
3497 (linux_init_signals): Delete.
3498 (initialize_low): Adjust.
3499 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3500
7544db95
PA
35012015-12-16 Pedro Alves <palves@redhat.com>
3502
3503 * configure.ac (compiler warning flags): When testing a
3504 -Wno-foo option, check whether -Wfoo works instead.
3505 * configure: Regenerate.
3506
8020350c
DB
35072015-12-11 Don Breazeal <donb@codesourcery.com>
3508
3509 * server.c (process_serial_event): Don't exit from gdbserver
3510 in remote mode if there are still active inferiors.
3511
db91f502
YQ
35122015-12-11 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3515 arm_breakpoint_at if the process is 32-bit.
3516
b37a6290
YQ
35172015-12-11 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3520 arm breakpoint.
3521
17b1509a
YQ
35222015-12-07 Yao Qi <yao.qi@linaro.org>
3523
3524 * configure.srv: Append arm.o to srv_tgtobj for
3525 aarch64*-*-linux* target.
3526 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3527 from linux-arm-low.c.
3528 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3529 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3530 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3531 (thumb2_breakpoint_len): Likewise.
3532 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3533 (arm_breakpoint_kinds): Likewise.
3534 (arm_breakpoint_kind_from_pc): Likewise.
3535 (arm_sw_breakpoint_from_kind): Likewise.
3536 (arm_breakpoint_kind_from_current_state): Likewise.
3537 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3538 (arm_sw_breakpoint_from_kind): Declare.
3539 (arm_breakpoint_kind_from_current_state): Declare.
3540 (arm_breakpoint_at): Declare.
3541 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3542 arm_sw_breakpoint_from_kind if process is 32-bit.
3543 (aarch64_breakpoint_kind_from_pc): New function.
3544 (aarch64_breakpoint_kind_from_current_state): New function.
3545 (the_low_target): Initialize fields breakpoint_kind_from_pc
3546 and breakpoint_kind_from_current_state.
3547 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3548 linux-aarch32-low.c.
3549 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3550 (arm_breakpoint, arm_breakpoint_len): Likewise.
3551 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3553 (arm_is_thumb_mode): Likewise.
3554 (arm_breakpoint_at): Likewise.
3555 (arm_breakpoint_kind_from_pc): Likewise.
3556 (arm_sw_breakpoint_from_kind): Likewise.
3557 (arm_breakpoint_kind_from_current_state): Likewise.
3558
3559 Revert:
3560 2015-08-04 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3563 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3564 * server.c (extended_protocol): Remove "static".
3565 * server.h (extended_protocol): Declare it.
3566
ece66d65
JS
35672015-12-04 Josh Stone <jistone@redhat.com>
3568
3569 * target.h (struct target_ops) <arch_setup>: Rename to ...
3570 (struct target_ops) <post_create_inferior>: ... this.
3571 (target_arch_setup): Rename to ...
3572 (target_post_create_inferior): ... this, calling post_create_inferior.
3573 * server.c (start_inferior): Update target_arch_setup calls to
3574 target_post_create_inferior.
3575 * linux-low.c (linux_low_ptrace_options): Forward declare.
3576 (linux_arch_setup): Update its comment for general use.
3577 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3578 (struct linux_target_ops): Use linux_post_create_inferior.
3579 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3580 to post_create_inferior.
3581 * nto-low.c (struct nto_target_ops): Likewise.
3582 * spu-low.c (struct spu_target_ops): Likewise.
3583 * win32-low.c (struct win32_target_ops): Likewise.
3584
e58c48b4
AT
35852015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3586
3587 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3588
fbec8956
AT
35892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3590
3591 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3592 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3593 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3594 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3595 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3596 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3597 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3598 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3599 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3600 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3601 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3602 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3603
9b4c5f87
AT
36042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3605
3606 * linux-low.c (linux_look_up_symbols): Don't call
3607 linux_supports_traceclone.
3608 * linux-low.h (thread_db_init): Remove use_events argument.
3609 * thread-db.c (thread_db_use_event): Remove global variable.
3610 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3611 (struct thread_db) <td_create_bp>: Remove field.
3612 (thread_db_create_event): Remove function.
3613 (thread_db_enable_reporting): Likewise.
3614 (find_one_thread): Don't check for thread_db_use_events.
3615 (attach_thread): Likewise.
3616 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3617 (try_thread_db_load_1): Don't check for thread_db_use_events.
3618 (thread_db_init): Remove use_events argument and thread events
3619 handling.
3620 (remove_thread_event_breakpoints): Remove function.
3621 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3622
7d00775e
AT
36232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3624
3625 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3626 New function.
3627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3628 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3630 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3631 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3632 Initialize.
3633 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3634 New function.
3635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3636 * linux-low.c (can_hardware_single_step): Use
3637 supports_hardware_single_step.
3638 (can_software_single_step): New function.
3639 (start_step_over): Call can_software_single_step.
3640 (linux_supports_hardware_single_step): New function.
3641 (struct target_ops) <supports_software_single_step>: Initialize.
3642 * linux-low.h (struct linux_target_ops)
3643 <supports_hardware_single_step>: Initialize.
3644 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3645 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3646 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3647 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3648 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3650 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3652 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3653 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3654 Initialize.
3655 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3656 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3657 Initialize.
3658 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3660 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3661 New function.
3662 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3663 * target.h (struct target_ops): <supports_software_single_step>:
3664 New field.
3665 (target_supports_software_single_step): New macro.
3666
2d97cd35
AT
36672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3668
3669 * linux-low.c (linux_wait_1): Fix pc advance condition.
3670 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3671 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3672
769ef81f
AT
36732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3674
3675 * linux-arm-low.c (arm_is_thumb_mode): New function.
3676 (arm_breakpoint_at): Use arm_is_thumb_mode.
3677 (arm_breakpoint_kind_from_current_state): New function.
3678 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3679 Initialize.
3680 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3681 (linux_breakpoint_kind_from_current_state): New function.
3682 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3683 * linux-low.h (struct linux_target_ops)
3684 <breakpoint_kind_from_current_state>: New field.
3685 * target.h (struct target_ops): Likewise.
3686 (target_breakpoint_kind_from_current_state): New macro.
3687
1bebeeca
PA
36882015-11-30 Pedro Alves <palves@redhat.com>
3689
3690 * linux-low.c (linux_resume): Wake up the event loop before
3691 returning.
3692
a67a9fae
PA
36932015-11-30 Pedro Alves <palves@redhat.com>
3694
3695 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3696 check.
3697 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3698 to -1.
3699 * target.c (struct thread_search): New structure.
3700 (thread_search_callback): New function.
3701 (prev_general_thread): New global.
3702 (prepare_to_access_memory, done_accessing_memory): New functions.
3703 * target.h (prepare_to_access_memory, done_accessing_memory):
3704 Replace macros with function declarations.
3705
f2faf941
PA
37062015-11-30 Pedro Alves <palves@redhat.com>
3707
3708 PR 14618
3709 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3710 report TARGET_WAITKIND_NO_RESUMED.
3711 * remote-utils.c (prepare_resume_reply): Handle
3712 TARGET_WAITKIND_NO_RESUMED.
3713 * server.c (report_no_resumed): New global.
3714 (handle_query) <qSupported>: Handle "no-resumed+". Report
3715 "no-resumed+" support.
3716 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3717 return error if the client doesn't support no-resumed events.
3718 (push_stop_notification): New function.
3719 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3720 events if the client supports them.
3721
a681f9c9
PA
37222015-11-30 Pedro Alves <palves@redhat.com>
3723
3724 * linux-low.c (thread_still_has_status_pending_p): Don't check
3725 vCont;t here.
3726 (lwp_resumed): New function.
3727 (status_pending_p_callback): Return early if the LWP is not
3728 supposed to be resumed.
3729
65706a29
PA
37302015-11-30 Pedro Alves <palves@redhat.com>
3731
3732 * linux-low.c (handle_extended_wait): Assert that the LWP's
3733 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3734 thread create events, leave the new child's status pending.
3735 (linux_low_filter_event): If GDB wants to hear about thread exit
3736 events, leave the LWP marked dead and don't delete it.
3737 (linux_wait_for_event_filtered): Don't check for thread exit.
3738 (filter_exit_event): New function.
3739 (linux_wait_1): Use it, when returning an exit event.
3740 (linux_resume_one_lwp_throw): Assert that the LWP's
3741 waitstatus is TARGET_WAITKIND_IGNORE.
3742 * remote-utils.c (prepare_resume_reply): Handle
3743 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3744 * server.c (report_thread_events): New global.
3745 (handle_general_set): Handle QThreadEvents.
3746 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3747 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3748 TARGET_WAITKIND_THREAD_EXITED.
3749 * server.h (report_thread_events): Declare.
3750
56cf4bed
PA
37512015-11-30 Pedro Alves <palves@redhat.com>
3752
3753 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3754 the thread's last_resume_kind was resume_stop.
3755
500c1d85
PA
37562015-11-30 Pedro Alves <palves@redhat.com>
3757
3758 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3759 before returning.
3760
de979965
PA
37612015-11-30 Pedro Alves <palves@redhat.com>
3762
3763 * server.c (handle_v_requests): Handle vCtrlC.
3764
34c65914
PA
37652015-11-30 Pedro Alves <palves@redhat.com>
3766
3767 * gdbthread.h (find_any_thread_of_pid): Declare.
3768 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3769 functions.
3770 * server.c (handle_query): If current_thread is NULL, look for
3771 another thread of the selected process.
3772
79efa585 37732015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3774 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3775
3776 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3777 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3778 name in reply.
3779 * target.h (struct target_ops) <thread_name>: New field.
3780 (target_thread_name): New macro.
3781
80d82c19
JB
37822015-11-23 Joel Brobecker <brobecker@adacore.com>
3783
3784 * regcache.h (regcache_invalidate_pid): Add declaration.
3785 * regcache.c (regcache_invalidate_pid): New function, extracted
3786 from regcache_invalidate.
3787 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3788 Add trivial documentation comment.
3789 * lynx-low.c: Use regcache_invalidate_pid instead of
3790 regcache_invalidate.
3791
64da5dd5
JB
37922015-11-23 Joel Brobecker <brobecker@adacore.com>
3793
3794 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3795 and Elf64_auxv_t if the target is Android.
3796
37ce4055
DE
37972015-11-22 Doug Evans <xdje42@gmail.com>
3798
3799 * target.h: #include <sys/types.h>.
3800
06e03fff
PA
38012015-11-19 Pedro Alves <palves@redhat.com>
3802
3803 * linux-low.c (linux_process_qsupported): Change prototype.
3804 Adjust.
3805 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3806 Change prototype.
3807 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3808 and adjust to loop over all features.
3809 * server.c (handle_query) <qSupported>: Adjust to call
3810 target_process_qsupported once, passing it a vector of unprocessed
3811 features.
3812 * target.h (struct target_ops) <process_qsupported>: Change
3813 prototype.
3814 (target_process_qsupported): Adjust.
3815
9a084706
PA
38162015-11-19 Pedro Alves <palves@redhat.com>
3817
3818 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3819 mode.
3820 * configure: Regenerate.
3821
dad44a1f
PA
38222015-11-19 Pedro Alves <palves@redhat.com>
3823
3824 * configure: Regenerate.
3825
231c0592
YQ
38262015-11-19 Yao Qi <yao.qi@linaro.org>
3827
3828 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3829 type to uint32_t.
3830
6c1c9a8b
YQ
38312015-11-19 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3834 (struct aarch64_operand): Move enum out.
3835
9caa3311
YQ
38362015-11-19 Yao Qi <yao.qi@linaro.org>
3837
3838 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3839 struct user_fpsimd_state *.
3840 (aarch64_store_fpregset): Likewise.
3841
6a69a054
YQ
38422015-11-19 Yao Qi <yao.qi@linaro.org>
3843
3844 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3845 struct user_pt_regs *.
3846 (aarch64_store_gregset): Likewise.
3847
1798301e
PA
38482015-11-18 Pedro Alves <palves@redhat.com>
3849
3850 * Makefile.in (all_object_files): Add $IPA_OBJS.
3851
ce7715e2
PA
38522015-11-17 Pedro Alves <palves@redhat.com>
3853
3854 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3855 GDB_SIGNAL_0 and gdb_signal_to_string.
3856
c0879059
PA
38572015-11-17 Pedro Alves <palves@redhat.com>
3858
3859 * win32-low.c (handle_output_debug_string): Remove parameter.
3860 (win32_kill): Remove our_status local and adjust call to
3861 handle_output_debug_string.
3862 (get_child_debug_event): Adjust call to
3863 handle_output_debug_string.
3864
1996e237
SM
38652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * linux-mips-low.c (mips_fill_gregset): Add cast.
3868 (mips_store_gregset): Likewise.
3869 (mips_fill_fpregset): Likewise.
3870 (mips_store_fpregset): Likewise.
3871
cbec665b
SM
38722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3873
3874 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3875 priv.
3876
eb3e3c67
SM
38772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3878
3879 * linux-mips-low.c (mips_linux_new_thread): Change type of
3880 watch_type to enum target_hw_bp_type.
3881
171de4b8
SM
38822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3883
3884 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3885 Change return type to arm_hwbp_type.
3886
04248ead
SM
38872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3888
3889 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3890 (arm_store_gregset): Likewise.
3891 * linux-arm-low.c (arm_get_hwcap): Likewise.
3892 (arm_read_description): Likewise.
3893
04b3479c
SM
38942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3895
3896 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3897
2bc84e8a
SM
38982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3899
3900 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3901 (ppc_fill_vsxregset): Likewise.
3902 (ppc_store_vsxregset): Likewise.
3903 (ppc_fill_vrregset): Likewise.
3904 (ppc_store_vrregset): Likewise.
3905 (ppc_fill_evrregset): Likewise.
3906 (ppc_store_evrregset): Likewise.
3907
e6c5bb05
SM
39082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3909
3910 * linux-ppc-low.c (ppc_usrregs_info): Remove
3911 forward-declaration.
3912 (ppc_arch_setup): Move lower in file.
3913
7ea45d72
SM
39142015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3915
3916 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3917 (ps_pdwrite): Likewise.
3918
69291610
HW
39192015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3920
3921 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3922 to after assert checks.
3923
b42945fd
SM
39242015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3925
3926 * proc-service.c (ps_pdread): Add/adjust casts.
3927 (ps_pdwrite): Add/adjust casts.
3928
d6f85c84
SM
39292015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3930
3931 * server.c (handle_search_memory_1): Cast return value of
3932 memmem.
3933
f98cd059
SM
39342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3935
3936 * server.c (write_qxfer_response): Change type of data to
3937 gdb_byte *.
3938
d2412fa5
PA
39392015-10-29 Pedro Alves <palves@redhat.com>
3940
3941 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3942
c17414a2
PA
39432015-10-29 Pedro Alves <palves@redhat.com>
3944
3945 * tracepoint.c (clear_installed_tracepoints): Add casts.
3946
e053fbc4
PA
39472015-10-29 Pedro Alves <palves@redhat.com>
3948
3949 * server.c (handle_v_cont, process_serial_event): Add enum
3950 gdb_signal casts to signal parsing code.
3951
add67df8
PA
39522015-10-29 Pedro Alves <palves@redhat.com>
3953
3954 * linux-low.h (NULL_REGSET): Define.
3955 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3956 * linux-arm-low.c (arm_regsets): Likewise.
3957 * linux-crisv32-low.c (cris_regsets): Likewise.
3958 * linux-m68k-low.c (m68k_regsets): Likewise.
3959 * linux-mips-low.c (mips_regsets): Likewise.
3960 * linux-nios2-low.c (nios2_regsets): Likewise.
3961 * linux-ppc-low.c (ppc_regsets): Likewise.
3962 * linux-s390-low.c (s390_regsets): Likewise.
3963 * linux-sh-low.c (sh_regsets): Likewise.
3964 * linux-sparc-low.c (sparc_regsets): Likewise.
3965 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3966 * linux-tile-low.c (tile_regsets): Likewise.
3967 * linux-x86-low.c (x86_regsets): Likewise.
3968 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3969
50bc912a
PA
39702015-10-29 Pedro Alves <palves@redhat.com>
3971
3972 * linux-low.h (NULL_REGSET): Define.
3973 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3974 * linux-arm-low.c (arm_regsets): Likewise.
3975 * linux-crisv32-low.c (cris_regsets): Likewise.
3976 * linux-m68k-low.c (m68k_regsets): Likewise.
3977 * linux-mips-low.c (mips_regsets): Likewise.
3978 * linux-nios2-low.c (nios2_regsets): Likewise.
3979 * linux-ppc-low.c (ppc_regsets): Likewise.
3980 * linux-s390-low.c (s390_regsets): Likewise.
3981 * linux-sh-low.c (sh_regsets): Likewise.
3982 * linux-sparc-low.c (sparc_regsets): Likewise.
3983 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3984 * linux-tile-low.c (tile_regsets): Likewise.
3985 * linux-x86-low.c (x86_regsets): Likewise.
3986 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3987
682b2546
DE
39882015-10-26 Doug Evans <dje@google.com>
3989
3990 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3991
963843d4
DE
39922015-10-26 Doug Evans <dje@google.com>
3993
3994 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3995
d41401ac
DE
39962015-10-26 Doug Evans <dje@google.com>
3997
3998 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3999 for debug_printf.
4000 (attach_thread, find_new_threads_callback): Ditto.
4001
3db28855
AT
40022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4003
4004 * mem-break.h (set_breakpoint_data): Remove.
4005
fb78e89c
AT
40062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4007
4008 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4009 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4010 (initialize_low): Remove set_breakpoint_data call.
4011 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4012 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4013 (initialize_low): Remove set_breakpoint_data call.
4014 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4015 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4016 (initialize_low): Remove set_breakpoint_data call.
4017
2e6ee069
AT
40182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4019
4020 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4021 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4022 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4023 * target.h (target_breakpoint_kind_from_pc): New macro.
4024
1652a986
AT
40252015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4026
4027 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4028 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4029 the default breakpoint kind.
4030
abeead09
AT
40312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4032
4033 * linux-arm-low.c (arm_supports_z_point_type): Add software
4034 breakpoint support.
4035
b0b4b501
AT
40362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4037
4038 * linux-arm-low.c: Refactor breakpoint definitions.
4039 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4040 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4041
8689682c
AT
40422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4043
4044 * Makefile.in: Add arm.c/o.
4045 * configure.srv: Likewise.
4046 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4047 (arm_breakpoint_kind_from_pc): New function.
4048 (arm_sw_breakpoint_from_kind): Return proper kind.
4049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4050
27165294
AT
40512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4052
4053 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4054 removal.
4055 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4056 (struct raw_breakpoint) <size>: Remove.
4057 (struct raw_breakpoint) <kind>: Add.
4058 (bp_size): New function.
4059 (bp_opcode): Likewise.
4060 (find_raw_breakpoint_at): Adjust for kind.
4061 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4062 (remove_memory_breakpoint): Adjust for kind call bp_size.
4063 (set_raw_breakpoint_at): Adjust for kind.
4064 (set_breakpoint): Likewise.
4065 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4066 (delete_raw_breakpoint): Adjust for kind.
4067 (delete_breakpoint): Likewise.
4068 (find_gdb_breakpoint): Likewise.
4069 (set_gdb_breakpoint_1): Likewise.
4070 (set_gdb_breakpoint): Likewise.
4071 (delete_gdb_breakpoint_1): Likewise.
4072 (delete_gdb_breakpoint): Likewise.
4073 (uninsert_raw_breakpoint): Likewise.
4074 (reinsert_raw_breakpoint): Likewise.
4075 (set_breakpoint_data): Remove.
4076 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4077 (check_mem_read): Adjust for kind call bp_size.
4078 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4079 (clone_one_breakpoint): Adjust for kind.
4080 * mem-break.h (set_gdb_breakpoint): Likewise.
4081 (delete_gdb_breakpoint): Likewise.
4082 * server.c (process_serial_event): Likewise.
4083
dd373349
AT
40842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4085
4086 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4087 (struct linux_target_ops) <breakpoint>: Remove.
4088 (struct linux_target_ops) <breakpoint_len>: Remove.
4089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4091 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4092 (arm_sw_breakpoint_from_kind): New function.
4093 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4094 (struct linux_target_ops) <breakpoint>: Remove.
4095 (struct linux_target_ops) <breakpoint_len>: Remove.
4096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4098 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4099 (struct linux_target_ops) <breakpoint>: Remove.
4100 (struct linux_target_ops) <breakpoint_len>: Remove.
4101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4103 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4104 (struct linux_target_ops) <breakpoint>: Remove.
4105 (struct linux_target_ops) <breakpoint_len>: Remove.
4106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4108 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4109 and sw_breakpoint_from_kind to increment the pc.
4110 (linux_breakpoint_kind_from_pc): New function.
4111 (linux_sw_breakpoint_from_kind): New function.
4112 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4113 (initialize_low): Call breakpoint_kind_from_pc and
4114 sw_breakpoint_from_kind to replace breakpoint_data/len.
4115 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4116 New field.
4117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4118 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4119 (struct linux_target_ops) <breakpoint>: Remove.
4120 (struct linux_target_ops) <breakpoint_len>: Remove.
4121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4123 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4124 (struct linux_target_ops) <breakpoint>: Remove.
4125 (struct linux_target_ops) <breakpoint_len>: Remove.
4126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4128 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4129 (struct linux_target_ops) <breakpoint>: Remove.
4130 (struct linux_target_ops) <breakpoint_len>: Remove.
4131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4133 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4134 (struct linux_target_ops) <breakpoint>: Remove.
4135 (struct linux_target_ops) <breakpoint_len>: Remove.
4136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4138 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4139 (struct linux_target_ops) <breakpoint>: Remove.
4140 (struct linux_target_ops) <breakpoint_len>: Remove.
4141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4143 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4144 (struct linux_target_ops) <breakpoint>: Remove.
4145 (struct linux_target_ops) <breakpoint_len>: Remove.
4146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4148 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4149 (struct linux_target_ops) <breakpoint>: Remove.
4150 (struct linux_target_ops) <breakpoint_len>: Remove.
4151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4153 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4154 (struct linux_target_ops) <breakpoint>: Remove.
4155 (struct linux_target_ops) <breakpoint_len>: Remove.
4156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4158 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4159 (struct linux_target_ops) <breakpoint>: Remove.
4160 (struct linux_target_ops) <breakpoint_len>: Remove.
4161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4163 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4164 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4165 (struct linux_target_ops) <breakpoint>: Remove.
4166 (struct linux_target_ops) <breakpoint_len>: Remove.
4167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4169 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4170 (struct linux_target_ops) <breakpoint>: Remove.
4171 (struct linux_target_ops) <breakpoint_len>: Remove.
4172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4174
4cd98a19
AT
41752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4176
4177 * linux-cris-low.c (cris_get_pc): Remove void arg.
4178
774ee6d2
AR
41792015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4180
4181 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4182 variable name.
4183
833dcd29
AR
41842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4185
4186 * inferiors.c (thread_pid_matches_callback): New function.
4187 (find_thread_process): New function.
4188 (remove_thread): Reset current_thread.
4189 (remove_process): Assert threads have been removed first.
4190
8d689ee5
YQ
41912015-10-15 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4194 if it is 3.
4195 (aarch64_remove_point): Likewise.
4196 * regcache.c (regcache_register_size): New function.
4197
1c2e1515
YQ
41982015-10-12 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c: Update all callers as emit_load_store
4201 is renamed to aarch64_emit_load_store.
4202
e1c587c3
YQ
42032015-10-12 Yao Qi <yao.qi@linaro.org>
4204
4205 * linux-aarch64-low.c: Update all callers of function renaming
4206 from emit_insn to aarch64_emit_insn.
4207
b6542f81
YQ
42082015-10-12 Yao Qi <yao.qi@linaro.org>
4209
4210 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4211 arch/aarch64-insn.h.
4212 (struct aarch64_memory_operand): Likewise.
4213 (ENCODE): Likewise.
4214 (emit_insn): Move to arch/aarch64-insn.c.
4215 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4216 (emit_load_store): Move to arch/aarch64-insn.c.
4217 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4218 (can_encode_int32): Remove.
4219
246994ce
YQ
42202015-10-12 Yao Qi <yao.qi@linaro.org>
4221
4222 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4223 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4224 (aarch64_relocate_instruction): Likewise.
4225 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4226 (struct aarch64_insn_visitor): Likewise.
4227
0badd99f
YQ
42282015-10-12 Yao Qi <yao.qi@linaro.org>
4229
4230 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4231 (struct aarch64_insn_visitor): New.
4232 (struct aarch64_insn_relocation_data): New.
4233 (aarch64_ftrace_insn_reloc_b): New function.
4234 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4235 (aarch64_ftrace_insn_reloc_cb): Likewise.
4236 (aarch64_ftrace_insn_reloc_tb): Likewise.
4237 (aarch64_ftrace_insn_reloc_adr): Likewise.
4238 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4239 (aarch64_ftrace_insn_reloc_others): Likewise.
4240 (visitor): New.
4241 (aarch64_relocate_instruction): Use visitor.
4242
dfaffe9d
YQ
42432015-10-12 Yao Qi <yao.qi@linaro.org>
4244
4245 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4246 int. Add argument buf.
4247 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4248 aarch64_relocate_instruction.
4249
70b439f0
YQ
42502015-10-12 Yao Qi <yao.qi@linaro.org>
4251
4252 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4253 argument insn. Remove local variable insn. Don't call
4254 target_read_uint32.
4255 (aarch64_install_fast_tracepoint_jump_pad): Call
4256 target_read_uint32.
4257
7781c06f
YQ
42582015-09-30 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4261 (emit_load_store_pair): Likewise.
4262
9a3c8263
SM
42632015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4264
4265 * dll.c (match_dll): Add cast(s).
4266 (unloaded_dll): Likewise.
4267 * linux-low.c (second_thread_of_pid_p): Likewise.
4268 (delete_lwp_callback): Likewise.
4269 (count_events_callback): Likewise.
4270 (select_event_lwp_callback): Likewise.
4271 (linux_set_resume_request): Likewise.
4272 * server.c (accumulate_file_name_length): Likewise.
4273 (emit_dll_description): Likewise.
4274 (handle_qxfer_threads_worker): Likewise.
4275 (visit_actioned_threads): Likewise.
4276 * thread-db.c (any_thread_of): Likewise.
4277 * tracepoint.c (same_process_p): Likewise.
4278 (match_blocktype): Likewise.
4279 (build_traceframe_info_xml): Likewise.
4280
224c3ddb
SM
42812015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4282
4283 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4284 assignment.
4285 (gdb_unparse_agent_expr): Likewise.
4286 * hostio.c (require_data): Likewise.
4287 (handle_pread): Likewise.
4288 * linux-low.c (disable_regset): Likewise.
4289 (fetch_register): Likewise.
4290 (store_register): Likewise.
4291 (get_dynamic): Likewise.
4292 (linux_qxfer_libraries_svr4): Likewise.
4293 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4294 (set_fast_tracepoint_jump): Likewise.
4295 (uninsert_fast_tracepoint_jumps_at): Likewise.
4296 (reinsert_fast_tracepoint_jumps_at): Likewise.
4297 (validate_inserted_breakpoint): Likewise.
4298 (clone_agent_expr): Likewise.
4299 * regcache.c (init_register_cache): Likewise.
4300 * remote-utils.c (putpkt_binary_1): Likewise.
4301 (decode_M_packet): Likewise.
4302 (decode_X_packet): Likewise.
4303 (look_up_one_symbol): Likewise.
4304 (relocate_instruction): Likewise.
4305 (monitor_output): Likewise.
4306 * server.c (handle_search_memory): Likewise.
4307 (handle_qxfer_exec_file): Likewise.
4308 (handle_qxfer_libraries): Likewise.
4309 (handle_qxfer): Likewise.
4310 (handle_query): Likewise.
4311 (handle_v_cont): Likewise.
4312 (handle_v_run): Likewise.
4313 (captured_main): Likewise.
4314 * target.c (write_inferior_memory): Likewise.
4315 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4316 * tracepoint.c (init_trace_buffer): Likewise.
4317 (add_tracepoint_action): Likewise.
4318 (add_traceframe): Likewise.
4319 (add_traceframe_block): Likewise.
4320 (cmd_qtdpsrc): Likewise.
4321 (cmd_qtdv): Likewise.
4322 (cmd_qtstatus): Likewise.
4323 (response_source): Likewise.
4324 (response_tsv): Likewise.
4325 (cmd_qtnotes): Likewise.
4326 (gdb_collect): Likewise.
4327 (initialize_tracepoint): Likewise.
4328
afbe19f8
PL
43292015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4330
4331 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4332 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4333 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4334 <NOP>: New.
4335 (enum aarch64_condition_codes): New enum.
4336 (w0): New static global.
4337 (fp): Likewise.
4338 (lr): Likewise.
4339 (struct aarch64_memory_operand) <type>: New
4340 MEMORY_OPERAND_POSTINDEX type.
4341 (postindex_memory_operand): New helper function.
4342 (emit_ret): New function.
4343 (emit_load_store_pair): New function, factored out of emit_stp
4344 with support for MEMORY_OPERAND_POSTINDEX.
4345 (emit_stp): Rewrite using emit_load_store_pair.
4346 (emit_ldp): New function.
4347 (emit_load_store): Likewise.
4348 (emit_ldr): Mention post-index instruction in comment.
4349 (emit_ldrh): New function.
4350 (emit_ldrb): New function.
4351 (emit_ldrsw): Mention post-index instruction in comment.
4352 (emit_str): Likewise.
4353 (emit_subs): New function.
4354 (emit_cmp): Likewise.
4355 (emit_and): Likewise.
4356 (emit_orr): Likewise.
4357 (emit_orn): Likewise.
4358 (emit_eor): Likewise.
4359 (emit_mvn): Likewise.
4360 (emit_lslv): Likewise.
4361 (emit_lsrv): Likewise.
4362 (emit_asrv): Likewise.
4363 (emit_mul): Likewise.
4364 (emit_sbfm): Likewise.
4365 (emit_sbfx): Likewise.
4366 (emit_ubfm): Likewise.
4367 (emit_ubfx): Likewise.
4368 (emit_csinc): Likewise.
4369 (emit_cset): Likewise.
4370 (emit_nop): Likewise.
4371 (emit_ops_insns): New helper function.
4372 (emit_pop): Likewise.
4373 (emit_push): Likewise.
4374 (aarch64_emit_prologue): New function.
4375 (aarch64_emit_epilogue): Likewise.
4376 (aarch64_emit_add): Likewise.
4377 (aarch64_emit_sub): Likewise.
4378 (aarch64_emit_mul): Likewise.
4379 (aarch64_emit_lsh): Likewise.
4380 (aarch64_emit_rsh_signed): Likewise.
4381 (aarch64_emit_rsh_unsigned): Likewise.
4382 (aarch64_emit_ext): Likewise.
4383 (aarch64_emit_log_not): Likewise.
4384 (aarch64_emit_bit_and): Likewise.
4385 (aarch64_emit_bit_or): Likewise.
4386 (aarch64_emit_bit_xor): Likewise.
4387 (aarch64_emit_bit_not): Likewise.
4388 (aarch64_emit_equal): Likewise.
4389 (aarch64_emit_less_signed): Likewise.
4390 (aarch64_emit_less_unsigned): Likewise.
4391 (aarch64_emit_ref): Likewise.
4392 (aarch64_emit_if_goto): Likewise.
4393 (aarch64_emit_goto): Likewise.
4394 (aarch64_write_goto_address): Likewise.
4395 (aarch64_emit_const): Likewise.
4396 (aarch64_emit_call): Likewise.
4397 (aarch64_emit_reg): Likewise.
4398 (aarch64_emit_pop): Likewise.
4399 (aarch64_emit_stack_flush): Likewise.
4400 (aarch64_emit_zero_ext): Likewise.
4401 (aarch64_emit_swap): Likewise.
4402 (aarch64_emit_stack_adjust): Likewise.
4403 (aarch64_emit_int_call_1): Likewise.
4404 (aarch64_emit_void_call_2): Likewise.
4405 (aarch64_emit_eq_goto): Likewise.
4406 (aarch64_emit_ne_goto): Likewise.
4407 (aarch64_emit_lt_goto): Likewise.
4408 (aarch64_emit_le_goto): Likewise.
4409 (aarch64_emit_gt_goto): Likewise.
4410 (aarch64_emit_ge_got): Likewise.
4411 (aarch64_emit_ops_impl): New static global variable.
4412 (aarch64_emit_ops): New target function, return
4413 &aarch64_emit_ops_impl.
4414 (struct linux_target_ops): Install it.
4415
bb903df0
PL
44162015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4417
4418 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4419 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4420 aarch64-ipa.o.
4421 * linux-aarch64-ipa.c: New file.
4422 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4423 and endian.h.
4424 (aarch64_get_thread_area): New target method.
4425 (extract_signed_bitfield): New helper function.
4426 (aarch64_decode_ldr_literal): New function.
4427 (enum aarch64_opcodes): New enum.
4428 (struct aarch64_register): New struct.
4429 (struct aarch64_operand): New struct.
4430 (x0): New static global.
4431 (x1): Likewise.
4432 (x2): Likewise.
4433 (x3): Likewise.
4434 (x4): Likewise.
4435 (w2): Likewise.
4436 (ip0): Likewise.
4437 (sp): Likewise.
4438 (xzr): Likewise.
4439 (aarch64_register): New helper function.
4440 (register_operand): Likewise.
4441 (immediate_operand): Likewise.
4442 (struct aarch64_memory_operand): New struct.
4443 (offset_memory_operand): New helper function.
4444 (preindex_memory_operand): Likewise.
4445 (enum aarch64_system_control_registers): New enum.
4446 (ENCODE): New macro.
4447 (emit_insn): New helper function.
4448 (emit_b): New function.
4449 (emit_bcond): Likewise.
4450 (emit_cb): Likewise.
4451 (emit_tb): Likewise.
4452 (emit_blr): Likewise.
4453 (emit_stp): Likewise.
4454 (emit_ldp_q_offset): Likewise.
4455 (emit_stp_q_offset): Likewise.
4456 (emit_load_store): Likewise.
4457 (emit_ldr): Likewise.
4458 (emit_ldrsw): Likewise.
4459 (emit_str): Likewise.
4460 (emit_ldaxr): Likewise.
4461 (emit_stxr): Likewise.
4462 (emit_stlr): Likewise.
4463 (emit_data_processing_reg): Likewise.
4464 (emit_data_processing): Likewise.
4465 (emit_add): Likewise.
4466 (emit_sub): Likewise.
4467 (emit_mov): Likewise.
4468 (emit_movk): Likewise.
4469 (emit_mov_addr): Likewise.
4470 (emit_mrs): Likewise.
4471 (emit_msr): Likewise.
4472 (emit_sevl): Likewise.
4473 (emit_wfe): Likewise.
4474 (append_insns): Likewise.
4475 (can_encode_int32_in): New helper function.
4476 (aarch64_relocate_instruction): New function.
4477 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4478 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4479 (struct linux_target_ops): Install aarch64_get_thread_area,
4480 aarch64_install_fast_tracepoint_jump_pad and
4481 aarch64_get_min_fast_tracepoint_insn_len.
4482
787749ea
PL
44832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4484
4485 * Makefile.in (aarch64-insn.o): New rule.
4486 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4487
9812b2e6
YQ
44882015-09-21 Yao Qi <yao.qi@linaro.org>
4489
4490 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4491
18fe412b
YQ
44922015-09-21 Yao Qi <yao.qi@linaro.org>
4493
4494 * tracepoint.c (max_jump_pad_size): Remove.
4495
a0cc84cd
YQ
44962015-09-18 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-aarch64-low.c: Don't include sys/uio.h.
4499 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4500
d78908cf
WW
45012015-09-16 Wei-cheng Wang <cole945@gmail.com>
4502
4503 * tracepoint.c (eval_result_type): Change prototype.
4504 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4505
d57e0d50
PA
45062015-09-15 Pedro Alves <palves@redhat.com>
4507
4508 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4509 Check whether to report exec events instead of checking whether
4510 multiprocess is enabled.
4511
5a676acc
PA
45122015-09-15 Pedro Alves <palves@redhat.com>
4513
4514 PR remote/18965
4515 * remote-utils.c (prepare_resume_reply): Merge
4516 TARGET_WAITKIND_VFORK_DONE switch case with the
4517 TARGET_WAITKIND_FORKED case.
4518
7c5d0fad
YQ
45192015-09-15 Yao Qi <yao.qi@linaro.org>
4520
4521 * server.c (handle_query): Check string comparison using
4522 "else if" instead of "if".
4523
750ce8d1
YQ
45242015-09-15 Yao Qi <yao.qi@linaro.org>
4525
4526 * server.c (vCont_supported): New global variable.
4527 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4528 matches. Append ";vContSupported+" to own_buf.
4529 (handle_v_requests): Append ";s;S" to own_buf if target supports
4530 hardware single step or vCont_supported is false.
4531 (capture_main): Set vCont_supported to zero.
4532
70b90b91
YQ
45332015-09-15 Yao Qi <yao.qi@linaro.org>
4534
4535 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4536 it to ...
4537 (linux_supports_hardware_single_step): ... New function.
4538 (linux_target_ops): Update.
4539 * lynx-low.c (lynx_target_ops): Set field
4540 supports_hardware_single_step to target_can_do_hardware_single_step.
4541 * nto-low.c (nto_target_ops): Likewise.
4542 * spu-low.c (spu_target_ops): Likewise.
4543 * win32-low.c (win32_target_ops): Likewise.
4544 * target.c (target_can_do_hardware_single_step): New function.
4545 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4546 Remove. <supports_hardware_single_step>: New field.
4547 (target_supports_conditional_breakpoints): Remove.
4548 (target_supports_hardware_single_step): New macro.
4549 (target_can_do_hardware_single_step): Declare.
4550 * server.c (handle_query): Use target_supports_hardware_single_step
4551 instead of target_supports_conditional_breakpoints.
4552
ade90bde
YQ
45532015-09-15 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4556 function.
4557 (struct linux_target_ops the_low_target): Install
4558 aarch64_linux_siginfo_fixup.
4559
94585166
DB
45602015-09-11 Don Breazeal <donb@codesourcery.com>
4561 Luis Machado <lgustavo@codesourcery.com>
4562
4563 * linux-low.c (linux_mourn): Static declaration.
4564 (linux_arch_setup): Move in front of
4565 handle_extended_wait.
4566 (linux_arch_setup_thread): New function.
4567 (handle_extended_wait): Handle exec events. Call
4568 linux_arch_setup_thread. Make event_lwp argument a
4569 pointer-to-a-pointer.
4570 (check_zombie_leaders): Do not check stopped threads.
4571 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4572 (linux_low_filter_event): Add lwp and thread for exec'ing
4573 non-leader thread if leader thread has been deleted.
4574 Refactor code into linux_arch_setup_thread and call it.
4575 Pass child lwp pointer by reference to handle_extended_wait.
4576 (linux_wait_for_event_filtered): Update comment.
4577 (linux_wait_1): Prevent clobbering exec event status.
4578 (linux_supports_exec_events): New function.
4579 (linux_target_ops) <supports_exec_events>: Initialize new member.
4580 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4581 new member.
4582 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4583 * server.c (report_exec_events): New global variable.
4584 (handle_query): Handle qSupported query for exec-events feature.
4585 (captured_main): Initialize report_exec_events.
4586 * server.h (report_exec_events): Declare new global variable.
4587 * target.h (struct target_ops) <supports_exec_events>: New
4588 member.
4589 (target_supports_exec_events): New macro.
4590 * win32-low.c (win32_target_ops) <supports_exec_events>:
4591 Initialize new member.
4592
0568462b
MM
45932015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4594
4595 * linux-low.c (linux_low_enable_btrace): Remove.
4596 (linux_target_ops): Replace linux_low_enable_btrace with
4597 linux_enable_btrace.
4598
39edd165
YQ
45992015-09-03 Yao Qi <yao.qi@linaro.org>
4600
4601 * linux-aarch64-low.c (aarch64_insert_point): Call
4602 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4603 returns true.
4604
1db33b5a
UW
46052015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4606
4607 * linux-low.c (check_stopped_by_breakpoint): Use
4608 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4609
ab290430
PA
46102015-08-27 Pedro Alves <palves@redhat.com>
4611
4612 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4613
8d749320
SM
46142015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4615
6711b7f8
SM
4616 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4617 the XNEW-family equivalent.
8d749320
SM
4618 (compile_bytecodes): Likewise.
4619 * dll.c (loaded_dll): Likewise.
4620 * event-loop.c (append_callback_event): Likewise.
4621 (create_file_handler): Likewise.
4622 (create_file_event): Likewise.
4623 * hostio.c (handle_open): Likewise.
4624 * inferiors.c (add_thread): Likewise.
4625 (add_process): Likewise.
4626 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4627 * linux-arm-low.c (arm_new_process): Likewise.
4628 (arm_new_thread): Likewise.
4629 * linux-low.c (add_to_pid_list): Likewise.
4630 (linux_add_process): Likewise.
4631 (handle_extended_wait): Likewise.
4632 (add_lwp): Likewise.
4633 (enqueue_one_deferred_signal): Likewise.
4634 (enqueue_pending_signal): Likewise.
4635 (linux_resume_one_lwp_throw): Likewise.
4636 (linux_resume_one_thread): Likewise.
4637 (linux_read_memory): Likewise.
4638 (linux_write_memory): Likewise.
4639 * linux-mips-low.c (mips_linux_new_process): Likewise.
4640 (mips_linux_new_thread): Likewise.
4641 (mips_add_watchpoint): Likewise.
4642 * linux-x86-low.c (initialize_low_arch): Likewise.
4643 * lynx-low.c (lynx_add_process): Likewise.
4644 * mem-break.c (set_raw_breakpoint_at): Likewise.
4645 (set_breakpoint): Likewise.
4646 (add_condition_to_breakpoint): Likewise.
4647 (add_commands_to_breakpoint): Likewise.
4648 (clone_agent_expr): Likewise.
4649 (clone_one_breakpoint): Likewise.
4650 * regcache.c (new_register_cache): Likewise.
4651 * remote-utils.c (look_up_one_symbol): Likewise.
4652 * server.c (queue_stop_reply): Likewise.
4653 (start_inferior): Likewise.
4654 (queue_stop_reply_callback): Likewise.
4655 (handle_target_event): Likewise.
4656 * spu-low.c (fetch_ppc_memory): Likewise.
4657 (store_ppc_memory): Likewise.
4658 * target.c (set_target_ops): Likewise.
4659 * thread-db.c (thread_db_load_search): Likewise.
4660 (try_thread_db_load_1): Likewise.
4661 * tracepoint.c (add_tracepoint): Likewise.
4662 (add_tracepoint_action): Likewise.
4663 (create_trace_state_variable): Likewise.
4664 (cmd_qtdpsrc): Likewise.
4665 (cmd_qtro): Likewise.
4666 (add_while_stepping_state): Likewise.
4667 * win32-low.c (child_add_thread): Likewise.
4668 (get_image_name): Likewise.
4669
ed8b7b42
YQ
46702015-08-25 Yao Qi <yao.qi@linaro.org>
4671
4672 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4673
db3cb7cb
YQ
46742015-08-25 Yao Qi <yao.qi@linaro.org>
4675
4676 * Makefile.in (aarch64-linux.o): New rule.
4677 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4678 srv_tgtobj.
4679 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4680 (aarch64_init_debug_reg_state): Make it extern.
4681 (aarch64_linux_prepare_to_resume): Remove.
4682
f6011a1c
YQ
46832015-08-25 Yao Qi <yao.qi@linaro.org>
4684
4685 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4686 lwp_arch_private_info and ptid_of_lwp.
4687
88e2cf7e
YQ
46882015-08-25 Yao Qi <yao.qi@linaro.org>
4689
4690 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4691 Find proc_info by find_process_pid. All callers updated.
4692
5e35436e
YQ
46932015-08-25 Yao Qi <yao.qi@linaro.org>
4694
4695 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4696 Remove.
4697 (debug_reg_change_callback): Remove.
4698 (aarch64_notify_debug_reg_change): Remove.
4699
4a8a7965
YQ
47002015-08-25 Yao Qi <yao.qi@linaro.org>
4701
4702 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4703 Call current_lwp_ptid.
4704
32a271ee
YQ
47052015-08-25 Yao Qi <yao.qi@linaro.org>
4706
4707 * linux-aarch64-low.c (debug_reg_change_callback): Use
4708 debug_printf.
4709
0d51c8d7
YQ
47102015-08-25 Yao Qi <yao.qi@linaro.org>
4711
4712 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4713
31a43dd5
YQ
47142015-08-25 Yao Qi <yao.qi@linaro.org>
4715
4716 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4717
8ee52567
YQ
47182015-08-25 Yao Qi <yao.qi@linaro.org>
4719
4720 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4721 the code.
4722
ff3f0f45
YQ
47232015-08-25 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4726 Remove.
4727 (debug_reg_change_callback): Remove argument entry and add argument
4728 lwp. Remove local variable thread. Don't print thread id in the
4729 debugging output. Don't check whether pid of thread equals to pid.
4730 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4731 iterate_over_lwps instead find_inferior.
4732
3d40fbb5
PA
47332015-08-24 Pedro Alves <palves@redhat.com>
4734
4735 * inferiors.c (get_first_process): New function.
4736 * inferiors.h (get_first_process): New declaration.
4737 * remote-utils.c (read_ptid): Default to the first process in the
4738 list, instead of to the current thread's process.
4739
438e1e42
PA
47402015-08-24 Pedro Alves <palves@redhat.com>
4741
4742 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4743 * event-loop.c: Likewise.
4744 * remote-utils.c: Likewise.
4745 * tracepoint.c: Likewise.
4746
a8c6d4fc
PA
47472015-08-24 Pedro Alves <palves@redhat.com>
4748
4749 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4750 ptid_get_lwp.
4751
99b0bb12
PA
47522015-08-21 Pedro Alves <palves@redhat.com>
4753
4754 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4755 instead of literal 1.
4756
f8904751
PA
47572015-08-21 Pedro Alves <palves@redhat.com>
4758
4759 * tdesc.c (default_description): Explicitly zero-initialize.
4760
465a859e
PA
47612015-08-21 Pedro Alves <palves@redhat.com>
4762
4763 PR gdb/18749
4764 * inferiors.c (remove_thread): Discard any pending stop reply for
4765 this thread.
4766 * server.c (remove_all_on_match_pid): Rename to ...
4767 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4768 instead of a pid.
4769 (discard_queued_stop_replies): Change parameter to a ptid. Now
4770 extern.
4771 (handle_v_kill, kill_inferior_callback, captured_main)
4772 (process_serial_event): Adjust.
4773 * server.h (discard_queued_stop_replies): Declare.
4774
f0db101d
PA
47752015-08-21 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (wait_for_sigstop): Always switch to no thread
4778 selected if the previously current thread dies.
4779 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4780 process instead of the current thread's.
4781 * remote-utils.c (input_interrupt): Don't check if there's no
4782 current thread.
4783 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4784 current thread to the general thread fails, error out.
4785 (handle_qxfer_auxv, handle_qxfer_libraries)
4786 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4787 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4788 (handle_query): Check if there's a thread selected instead of
4789 checking whether there's any thread in the thread list.
4790 (handle_qxfer_threads, handle_qxfer_btrace)
4791 (handle_qxfer_btrace_conf): Don't error out early if there's no
4792 thread in the thread list.
4793 (handle_v_cont, myresume): Don't set the current thread to the
4794 continue thread.
4795 (process_serial_event) <Hg handling>: Also set thread_id if the
4796 previous general thread is still alive.
4797 (process_serial_event) <g/G handling>: If setting the current
4798 thread to the general thread fails, error out.
4799 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4800 thread's lwp instead of the current thread's.
4801 * target.c (set_desired_thread): If the desired thread was not
4802 found, leave the current thread pointing to NULL. Return an int
4803 (boolean) indicating success.
4804 * target.h (set_desired_thread): Change return type to int.
4805
40045d91
MF
48062015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4807
4808 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4809 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4810 #includes.
4811 (ps_get_thread_area): New function.
4812
45face3b
GB
48132015-08-19 Gary Benson <gbenson@redhat.com>
4814
4815 * hostio.c (handle_pread): Do not attempt to read more data
4816 than hostio_reply_with_data can fit in a packet.
4817
16d5f642
JB
48182015-08-18 Joel Brobecker <brobecker@adacore.com>
4819
4820 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4821
a738da3a
MF
48222015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4823
4824 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4825
33ebda9d
PA
48262015-08-06 Pedro Alves <palves@redhat.com>
4827
4828 * tracepoint.c (expr_eval_result): Now an int.
4829
a44892be
PA
48302015-08-06 Pedro Alves <palves@redhat.com>
4831
4832 * gdbthread.h (struct regcache): Forward declare.
4833 (struct thread_info) <regcache_data>: Now a struct regcache
4834 pointer.
4835 * inferiors.c (inferior_regcache_data)
4836 (set_inferior_regcache_data): Now work with struct regcache
4837 pointers.
4838 * inferiors.h (struct regcache): Forward declare.
4839 (inferior_regcache_data, set_inferior_regcache_data): Now work
4840 with struct regcache pointers.
4841 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4842 (free_register_cache_thread): Remove struct regcache pointer
4843 casts.
4844
608a1e46
PA
48452015-08-06 Pedro Alves <palves@redhat.com>
4846
4847 * server.c (captured_main): On error, print the exception message
4848 to stderr, and if run_once is set, throw a quit.
4849
f0ce0d3a
PA
48502015-08-06 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4853 the current thread.
4854
bf47e248
PA
48552015-08-06 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4858 reading beyond the passed in buffer length.
4859
b6b9ffcc
PL
48602015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4861
4862 * tracepoint.c (symbol_list) <required>: Remove.
4863
863d01bd
PA
48642015-08-06 Pedro Alves <palves@redhat.com>
4865
4866 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4867 count if stopping and suspending threads.
4868 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4869 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4870 (linux_detach): Complete an ongoing step-over.
4871 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4872 throughout.
4873 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4874 (linux_wait_1): If passing a signal to the inferior after
4875 finishing a step-over, unsuspend and re-resume all lwps. If we
4876 see a single-step event but the thread should be continuing, don't
4877 pass the trap to gdb.
4878 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4879 internal_error instead of gdb_assert.
4880 (enqueue_pending_signal): New function.
4881 (check_ptrace_stopped_lwp_gone): Add debug output.
4882 (start_step_over): Use internal_error instead of gdb_assert.
4883 (complete_ongoing_step_over): New function.
4884 (linux_resume_one_thread): Don't resume a suspended thread.
4885 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4886 it stepping.
4887
00db26fa
PA
48882015-08-06 Pedro Alves <palves@redhat.com>
4889
4890 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4891 (linux_thread_alive): Use lwp_is_marked_dead.
4892 (extended_event_reported): Delete.
4893 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4894 instead of extended_event_reported.
4895 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4896 as well.
4897 (lwp_is_marked_dead): New function.
4898 (lwp_running): Use lwp_is_marked_dead.
4899 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4900 comment.
4901
ad071a30
PA
49022015-08-06 Pedro Alves <palves@redhat.com>
4903
4904 * linux-low.c (linux_wait_1): Move fork event output out of the
4905 !report_to_gdb check. Pass event_child->waitstatus to
4906 target_waitstatus_to_string instead of ourstatus.
4907
524b57e6
YQ
49082015-08-04 Yao Qi <yao.qi@linaro.org>
4909
4910 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4911 if current_thread is 32 bit.
4912
6085d6f6
YQ
49132015-08-04 Yao Qi <yao.qi@linaro.org>
4914
4915 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4916 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4917 * server.c (extended_protocol): Remove "static".
4918 * server.h (extended_protocol): Declare it.
4919
8a7e4587
YQ
49202015-08-04 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4923 both aarch64 and aarch32.
4924 (aarch64_set_pc): Likewise.
4925
3b53ae99
YQ
49262015-08-04 Yao Qi <yao.qi@linaro.org>
4927
4928 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4929 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4930 arm-with-neon.xml to srv_xmlfiles.
4931 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4932 (is_64bit_tdesc): New function.
4933 (aarch64_linux_read_description): New function.
4934 (aarch64_arch_setup): Call aarch64_linux_read_description.
4935 (regs_info): Rename to regs_info_aarch64.
4936 (aarch64_regs_info): Return right regs_info.
4937 (initialize_low_arch): Call initialize_low_arch_aarch32.
4938
bd9e6534
YQ
49392015-08-04 Yao Qi <yao.qi@linaro.org>
4940
4941 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4942 * linux-aarch32-low.c: New file.
4943 * linux-aarch32-low.h: New file.
4944 * linux-arm-low.c (arm_fill_gregset): Move it to
4945 linux-aarch32-low.c.
4946 (arm_store_gregset): Likewise.
4947 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4948 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4949 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4950 (regs_info): Rename to regs_info_arm.
4951 (arm_regs_info): Return regs_info_aarch32 if
4952 have_ptrace_getregset is 1 and target description is
4953 arm_with_neon or arm_with_vfpv3.
4954 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4955 Call initialize_low_arch_aarch32 instead.
4956
ded48a5e
YQ
49572015-08-04 Yao Qi <yao.qi@linaro.org>
4958
4959 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4960 * linux-low.c: ... here.
4961 * linux-low.h (have_ptrace_getregset): Declare it.
4962
96e9210f
PA
49632015-08-04 Pedro Alves <palves@redhat.com>
4964
4965 * thread-db.c (struct thread_db): Use new typedefs.
4966 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4967 CHK calls.
4968 (disable_thread_event_reporting): Cast result of dlsym to
4969 destination function pointer type.
4970 (thread_db_mourn): Use td_ta_delete_ftype.
4971
af60a1ef
SL
49722015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4973
4974 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4975 arch variant.
4976 (CDX_BREAKPOINT): Define for R2.
4977 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4978 (the_low_target): Add comments.
4979
e8b41681
YQ
49802015-07-30 Yao Qi <yao.qi@linaro.org>
4981
4982 * linux-arm-low.c (arm_hwcap): Remove it.
4983 (arm_read_description): New local variable arm_hwcap. Don't
4984 set arm_hwcap to zero.
4985
89abb039
YQ
49862015-07-30 Yao Qi <yao.qi@linaro.org>
4987
4988 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4989 Use regcache->tdesc instead.
4990 (arm_store_wmmxregset): Likewise.
4991 (arm_fill_vfpregset): Likewise.
4992 (arm_store_vfpregset): Likewise.
4993
deca266c
YQ
49942015-07-30 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-arm-low.c: Include arch/arm.h.
4997 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4998 (arm_store_gregset): Likewise.
4999
aa58a496
SM
50002015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5001
5002 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5003 ptrace's 4th parameter.
5004
50904b25
YQ
50052015-07-27 Yao Qi <yao.qi@linaro.org>
5006
5007 * configure.srv (case aarch64*-*-linux*): Don't set
5008 srv_linux_usrregs.
5009
5826e159
PA
50102015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5011
5012 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5013 sys/ptrace.h.
5014 * linux-arm-low.c: Likewise.
5015 * linux-cris-low.c: Likewise.
5016 * linux-crisv32-low.c: Likewise.
5017 * linux-low.c: Likewise.
5018 * linux-m68k-low.c: Likewise.
5019 * linux-mips-low.c: Likewise.
5020 * linux-nios2-low.c: Likewise.
5021 * linux-s390-low.c: Likewise.
5022 * linux-sparc-low.c: Likewise.
5023 * linux-tic6x-low.c: Likewise.
5024 * linux-tile-low.c: Likewise.
5025 * linux-x86-low.c: Likewise.
5026
54019719
PA
50272015-07-24 Pedro Alves <palves@redhat.com>
5028
5029 * config.in: Regenerate.
5030 * configure: Regenerate.
5031
eb7aa561
PA
50322015-07-24 Pedro Alves <palves@redhat.com>
5033
5034 * acinclude.m4: Include ../ptrace.m4.
5035 * configure.ac: Call GDB_AC_PTRACE.
5036 * config.in, configure: Regenerate.
5037
55d7b841
YQ
50382015-07-24 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-low.c (linux_create_inferior): Remove setting to
5041 proc->priv->new_inferior.
5042 (linux_attach): Likewise.
5043 (linux_low_filter_event): Likewise.
5044 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5045
c06cbd92
YQ
50462015-07-24 Yao Qi <yao.qi@linaro.org>
5047
5048 * linux-low.c (linux_arch_setup): New function.
5049 (linux_low_filter_event): If proc->tdesc is NULL and
5050 proc->attached is true, call the_low_target.arch_setup.
5051 Otherwise, keep status pending, and return.
5052 (linux_resume_one_lwp_throw): Don't call get_pc if
5053 thread->while_stepping isn't NULL. Don't call
5054 get_thread_regcache if proc->tdesc is NULL.
5055 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5056 (linux_target_ops): Install arch_setup.
5057 * server.c (start_inferior): Call the_target->arch_setup.
5058 * target.h (struct target_ops) <arch_setup>: New field.
5059 (target_arch_setup): New marco.
5060 * lynx-low.c (lynx_target_ops): Update.
5061 * nto-low.c (nto_target_ops): Update.
5062 * spu-low.c (spu_target_ops): Update.
5063 * win32-low.c (win32_target_ops): Update.
5064
5ae3ebba
YQ
50652015-07-24 Yao Qi <yao.qi@linaro.org>
5066
5067 * linux-low.c (linux_add_process): Don't set
5068 proc->priv->new_inferior.
5069 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5070 (linux_attach): Likewise.
5071
eb97750b
YQ
50722015-07-24 Yao Qi <yao.qi@linaro.org>
5073
5074 * server.c (start_inferior): Code refactor.
5075
51aee833
YQ
50762015-07-24 Yao Qi <yao.qi@linaro.org>
5077
5078 * server.c (process_serial_event): Set general_thread.
5079
af1b22f3
YQ
50802015-07-21 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5083 aarch64_linux_get_debug_reg_capacity.
5084
554717a3
YQ
50852015-07-17 Yao Qi <yao.qi@linaro.org>
5086
5087 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5088 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5089 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5090 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5091 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5092 (AARCH64_HWP_ALIGNMENT): Likewise.
5093 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5094 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5095 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5096 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5097 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5098 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5099 (struct aarch64_debug_reg_state): Likewise.
5100 (struct arch_lwp_info): Likewise.
5101 (aarch64_align_watchpoint): Likewise.
5102 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5103 (aarch64_watchpoint_length): Likewise.
5104 (aarch64_point_encode_ctrl_reg): Likewise
5105 (aarch64_point_is_aligned): Likewise.
5106 (aarch64_align_watchpoint): Likewise.
5107 (aarch64_linux_set_debug_regs):
5108 (aarch64_dr_state_insert_one_point): Likewise.
5109 (aarch64_dr_state_remove_one_point): Likewise.
5110 (aarch64_handle_breakpoint): Likewise.
5111 (aarch64_handle_aligned_watchpoint): Likewise.
5112 (aarch64_handle_unaligned_watchpoint): Likewise.
5113 (aarch64_handle_watchpoint): Likewise.
5114
c67ca4de
YQ
51152015-07-17 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5118 and don't aarch64_get_debug_reg_state. All callers update.
5119 (aarch64_handle_aligned_watchpoint): Likewise.
5120 (aarch64_handle_unaligned_watchpoint): Likewise.
5121 (aarch64_handle_watchpoint): Likewise.
5122 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5123 (aarch64_remove_point): Likewise.
5124
25abf979
YQ
51252015-07-17 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5128 debug_printf.
5129 (aarch64_handle_unaligned_watchpoint): Likewise.
5130
db1ff28b
JK
51312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5132
5133 Revert the previous 3 commits:
5134 Move gdb_regex* to common/
5135 Move linux_find_memory_regions_full & co.
5136 gdbserver build-id attribute generator
5137
700ca40f
JK
51382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5139 Jan Kratochvil <jan.kratochvil@redhat.com>
5140
5141 gdbserver build-id attribute generator.
5142 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5143 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5144 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5145 (find_phdr): New.
5146 (get_dynamic): Use find_pdhr to traverse program headers.
5147 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5148 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5149 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5150 (get_hex_build_id): New.
5151 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5152 to reply XML document.
5153
9904185c
JK
51542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5155 Jan Kratochvil <jan.kratochvil@redhat.com>
5156
5157 * target.c: Include target/target-utils.h and fcntl.h.
5158 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5159 (target_fileio_read_stralloc): New functions.
5160
6e5b4429
JK
51612015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5162
5163 * Makefile.in (OBS): Add gdb_regex.o.
5164 (gdb_regex.o): New.
5165 * config.in: Rebuilt.
5166 * configure: Rebuilt.
5167
ddc98fbf
JK
51682015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5169 Jan Kratochvil <jan.kratochvil@redhat.com>
5170
5171 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5172 * Makefile.in (OBS): Add target-utils.o.
5173 (linux-maps.o, target-utils.o): New.
5174 * configure.srv (srv_linux_obj): Add linux-maps.o.
5175
e57bb7a0
PL
51762015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5177
5178 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5179 function, return 1.
5180 (the_low_target): Install it.
5181
586b02a9
PA
51822015-07-14 Pedro Alves <palves@redhat.com>
5183
5184 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5185 Instead, ignore ECHILD, and throw an error for other errnos.
5186
58c1b36c
PA
51872015-07-10 Pedro Alves <palves@redhat.com>
5188
5189 * event-loop.c (struct callback_event) <data>: Change type to
5190 gdb_client_data instance instead of gdb_client_data pointer.
5191 (append_callback_event): Adjust.
5192
421530db
PL
51932015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5194
5195 * linux-aarch64-low.c: Add comments for each linux_target_ops
5196 method. Remove comments already covered in target_ops and
5197 linux_target_ops definitions.
5198 (the_low_target): Add comments for each unimplemented method.
5199
c2d65f38
YQ
52002015-07-09 Yao Qi <yao.qi@linaro.org>
5201
5202 * linux-aarch64-low.c (aarch64_regmap): Remove.
5203 (aarch64_usrregs_info): Remove.
5204 (regs_info): Set field usrregs to NULL.
5205
b20a6524
MM
52062015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5207
5208 * linux-low.c: Include "rsp-low.h"
5209 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5210 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5211 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5212 (handle_btrace_enable_pt): New.
5213 (handle_btrace_general_set): Support "pt".
5214 (handle_btrace_conf_general_set): Support "pt:size".
5215
96c97461
PL
52162015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5217
5218 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5219 Z_PACKET_SW_BP.
5220
37d66942
PL
52212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5222
5223 * linux-aarch64-low.c: Remove comment about endianness.
5224 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5225 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5226 memcmp.
5227
dc06243f
GB
52282015-06-24 Gary Benson <gbenson@redhat.com>
5229
5230 * linux-i386-ipa.c (stdint.h): Do not include.
5231 * lynx-i386-low.c (stdint.h): Likewise.
5232 * lynx-ppc-low.c (stdint.h): Likewise.
5233 * mem-break.c (stdint.h): Likewise.
5234 * thread-db.c (stdint.h): Likewise.
5235 * tracepoint.c (stdint.h): Likewise.
5236 * win32-low.c (stdint.h): Likewise.
5237
124e13d9
SM
52382015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5239
5240 * server.c (write_qxfer_response): Update call to
5241 remote_escape_output.
5242
909c2cda
JK
52432015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5244 Jan Kratochvil <jan.kratochvil@redhat.com>
5245
5246 Merge multiple hex conversions.
5247 * gdbreplay.c (tohex): Rename to 'fromhex'.
5248 (logchar): Use fromhex.
5249
24c05f46
JK
52502015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5251
5252 * server.c (handle_qxfer_libraries): Set `version' attribute for
5253 <library-list>.
5254
14d2069a
GB
52552015-06-10 Gary Benson <gbenson@redhat.com>
5256
5257 * target.h (struct target_ops) <multifs_open>: New field.
5258 <multifs_unlink>: Likewise.
5259 <multifs_readlink>: Likewise.
5260 * linux-low.c (nat/linux-namespaces.h): New include.
5261 (linux_target_ops): Initialize the_target->multifs_open,
5262 the_target->multifs_unlink and the_target->multifs_readlink.
5263 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5264 * hostio.c (hostio_fs_pid): New static variable.
5265 (hostio_handle_new_gdb_connection): New function.
5266 (handle_setfs): Likewise.
5267 (handle_open): Use the_target->multifs_open as appropriate.
5268 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5269 (handle_readlink): Use the_target->multifs_readlink as
5270 appropriate.
5271 (handle_vFile): Handle vFile:setfs packets.
5272 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5273 after target_handle_new_gdb_connection.
5274
4b8b5e72
GB
52752015-06-10 Gary Benson <gbenson@redhat.com>
5276
5277 * configure.ac (AC_CHECK_FUNCS): Add setns.
5278 * config.in: Regenerate.
5279 * configure: Likewise.
5280 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5281 (linux-namespaces.o): New rule.
5282 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5283
3ac2e371
GB
52842015-06-09 Gary Benson <gbenson@redhat.com>
5285
5286 * hostio.c (handle_open): Process mode argument with
5287 fileio_to_host_mode.
5288
ca9b78ce
YQ
52892015-06-01 Yao Qi <yao.qi@linaro.org>
5290
5291 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5292 * linux-x86-low.c: Likewise.
5293
bfacd19d
DB
52942015-05-28 Don Breazeal <donb@codesourcery.com>
5295
5296 * linux-low.c (handle_extended_wait): Initialize
5297 thread_info.last_resume_kind for new fork children.
5298
452003ef
PA
52992015-05-15 Pedro Alves <palves@redhat.com>
5300
5301 * target.h (target_handle_new_gdb_connection): Rewrite using if
5302 wrapped in do/while.
5303
1041a03c
JB
53042015-05-14 Joel Brobecker <brobecker@adacore.com>
5305
5306 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5307 * configure, config.in: Regenerate.
5308 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5309 Declare typedef.
5310
c269dbdb
DB
53112015-05-12 Don Breazeal <donb@codesourcery.com>
5312
5313 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5314 PTRACE_EVENT_VFORK_DONE.
5315 (linux_low_ptrace_options, extended_event_reported): Add vfork
5316 events.
5317 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5318 and "vforkdone" for RSP 'T' Stop Reply Packet.
5319 * server.h (report_vfork_events): Declare
5320 global variable.
5321
3a8a0396
DB
53222015-05-12 Don Breazeal <donb@codesourcery.com>
5323
5324 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5325 (the_low_target) <new_fork>: Initialize new member.
5326 * linux-arm-low.c (arm_new_fork): New function.
5327 (the_low_target) <new_fork>: Initialize new member.
5328 * linux-low.c (handle_extended_wait): Call new target function
5329 new_fork.
5330 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5331 * linux-mips-low.c (mips_add_watchpoint): New function
5332 extracted from mips_insert_point.
5333 (the_low_target) <new_fork>: Initialize new member.
5334 (mips_linux_new_fork): New function.
5335 (mips_insert_point): Call mips_add_watchpoint.
5336 * linux-x86-low.c (x86_linux_new_fork): New function.
5337 (the_low_target) <new_fork>: Initialize new member.
5338
de0d863e
DB
53392015-05-12 Don Breazeal <donb@codesourcery.com>
5340
5341 * linux-low.c (handle_extended_wait): Implement return value,
5342 rename argument 'event_child' to 'event_lwp', handle
5343 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5344 (linux_low_ptrace_options): New function.
5345 (linux_low_filter_event): Call linux_low_ptrace_options,
5346 use different argument fo linux_enable_event_reporting,
5347 use return value from handle_extended_wait.
5348 (extended_event_reported): New function.
5349 (linux_wait_1): Call extended_event_reported and set
5350 status to report fork events.
5351 (linux_write_memory): Add pid to debug message.
5352 (reset_lwp_ptrace_options_callback): New function.
5353 (linux_handle_new_gdb_connection): New function.
5354 (linux_target_ops): Initialize new structure member.
5355 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5356 * lynx-low.c: Initialize new structure member.
5357 * remote-utils.c (prepare_resume_reply): Implement stop reason
5358 "fork" for "T" stop message.
5359 * server.c (handle_query): Call handle_new_gdb_connection.
5360 * server.h (report_fork_events): Declare global flag.
5361 * target.h (struct target_ops) <handle_new_gdb_connection>:
5362 New member.
5363 (target_handle_new_gdb_connection): New macro.
5364 * win32-low.c: Initialize new structure member.
5365
ddcbc397
DB
53662015-05-12 Don Breazeal <donb@codesourcery.com>
5367
5368 * mem-break.c (APPEND_TO_LIST): Define macro.
5369 (clone_agent_expr): New function.
5370 (clone_one_breakpoint): New function.
5371 (clone_all_breakpoints): New function.
5372 * mem-break.h: Declare new functions.
5373
89245bc0
DB
53742015-05-12 Don Breazeal <donb@codesourcery.com>
5375
5376 * linux-low.c (linux_supports_fork_events): New function.
5377 (linux_supports_vfork_events): New function.
5378 (linux_target_ops): Initialize new structure members.
5379 (initialize_low): Call linux_check_ptrace_features.
5380 * lynx-low.c (lynx_target_ops): Initialize new structure
5381 members.
5382 * server.c (report_fork_events, report_vfork_events):
5383 New global flags.
5384 (handle_query): Add new features to qSupported packet and
5385 response.
5386 (captured_main): Initialize new global variables.
5387 * target.h (struct target_ops) <supports_fork_events>:
5388 New member.
5389 <supports_vfork_events>: New member.
5390 (target_supports_fork_events): New macro.
5391 (target_supports_vfork_events): New macro.
5392 * win32-low.c (win32_target_ops): Initialize new structure
5393 members.
5394
835205d0
GB
53952015-05-12 Gary Benson <gbenson@redhat.com>
5396
5397 * server.c (handle_qxfer_exec_file): Use current process
5398 if annex is empty.
5399
21e94bd9
SL
54002015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5401
5402 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5403 Remove HAVE_PTRACE_GETREGS conditionals.
5404 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5405 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5406
45614f15
YQ
54072015-05-08 Yao Qi <yao.qi@linaro.org>
5408
5409 * linux-low.c (linux_supports_conditional_breakpoints): New
5410 function.
5411 (linux_target_ops): Install new target method.
5412 * lynx-low.c (lynx_target_ops): Install NULL hook for
5413 supports_conditional_breakpoints.
5414 * nto-low.c (nto_target_ops): Likewise.
5415 * spu-low.c (spu_target_ops): Likewise.
5416 * win32-low.c (win32_target_ops): Likewise.
5417 * server.c (handle_query): Check
5418 target_supports_conditional_breakpoints.
5419 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5420 New field.
5421 (target_supports_conditional_breakpoints): New macro.
5422
80ad801e
PA
54232015-05-06 Pedro Alves <palves@redhat.com>
5424
5425 PR server/18081
5426 * server.c (start_inferior): If the process exits, mourn it.
5427
819843c7
GB
54282015-04-21 Gary Benson <gbenson@redhat.com>
5429
5430 * hostio.c (fileio_open_flags_to_host): Factored out to
5431 fileio_to_host_openflags in common/fileio.c. Single use
5432 updated.
5433
a2d5a9d7
MF
54342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5435
5436 * linux-xtensa-low.c (xtensa_fill_gregset)
5437 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5438 XCHAL_HAVE_LOOP.
5439
deb44829
MF
54402015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5441
5442 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5443 (regs_info): Replace usrregs pointer with NULL.
5444
e57f1de3
GB
54452015-04-17 Gary Benson <gbenson@redhat.com>
5446
5447 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5448 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5449 * server.c (handle_qxfer_exec_file): New function.
5450 (qxfer_packets): Add exec-file entry.
5451 (handle_query): Report qXfer:exec-file:read as supported packet.
5452
62828379
RN
54532015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5454
5455 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5456
b88bb450
GB
54572015-04-09 Gary Benson <gbenson@redhat.com>
5458
5459 * hostio-errno.c (errno_to_fileio_error): Remove function.
5460 Update caller to use remote_fileio_to_fio_error.
5461
c8f4bfdd
YQ
54622015-04-09 Yao Qi <yao.qi@linaro.org>
5463
5464 * linux-low.c (linux_insert_point): Call
5465 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5466 (linux_remove_point): Call remove_memory_breakpoint if type is
5467 raw_bkpt_type_sw.
5468 * linux-x86-low.c (x86_insert_point): Don't call
5469 insert_memory_breakpoint.
5470 (x86_remove_point): Don't call remove_memory_breakpoint.
5471
41f98f02
PA
54722015-04-01 Pedro Alves <palves@redhat.com>
5473 Cleber Rosa <crosa@redhat.com>
5474
5475 * server.c (gdbserver_usage): Reorganize and extend the usage
5476 message.
5477
2bf6fb9d
PA
54782015-03-24 Pedro Alves <palves@redhat.com>
5479
5480 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5481 output. Also dump TRAP_TRACE.
5482 (linux_low_filter_event): In debug output, distinguish a
5483 resume_stop SIGSTOP from a delayed SIGSTOP.
5484
369f6daa
GB
54852015-03-24 Gary Benson <gbenson@redhat.com>
5486
5487 * linux-x86-low.c (x86_linux_new_thread): Moved to
5488 nat/x86-linux.c.
5489 (x86_linux_prepare_to_resume): Likewise.
5490
8e5d4070
GB
54912015-03-24 Gary Benson <gbenson@redhat.com>
5492
5493 * Makefile.in (x86-linux-dregs.o): New rule.
5494 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5495 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5496 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5497 (x86_linux_dr_get): Likewise.
5498 (x86_linux_dr_set): Likewise.
5499 (update_debug_registers_callback): Likewise.
5500 (x86_linux_dr_set_addr): Likewise.
5501 (x86_linux_dr_get_addr): Likewise.
5502 (x86_linux_dr_set_control): Likewise.
5503 (x86_linux_dr_get_control): Likewise.
5504 (x86_linux_dr_get_status): Likewise.
5505 (x86_linux_update_debug_registers): Likewise.
5506
2b95d440
GB
55072015-03-24 Gary Benson <gbenson@redhat.com>
5508
5509 * linux-x86-low.c (x86_linux_update_debug_registers):
5510 New function, factored out from...
5511 (x86_linux_prepare_to_resume): ...this.
5512
14b0bc68
GB
55132015-03-24 Gary Benson <gbenson@redhat.com>
5514
5515 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5516 (x86_linux_dr_set): Likewise.
5517 (update_debug_registers_callback): Likewise.
5518 (x86_linux_dr_set_addr): Likewise.
5519 (x86_linux_dr_get_addr): Likewise.
5520 (x86_linux_dr_set_control): Likewise.
5521 (x86_linux_dr_get_control): Likewise.
5522 (x86_linux_dr_get_status): Likewise.
5523 (x86_linux_prepare_to_resume): Likewise.
5524
5dfe6ca8
GB
55252015-03-24 Gary Benson <gbenson@redhat.com>
5526
5527 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5528 Use perror_with_name. Pass string through gettext.
5529 (x86_linux_dr_set): Likewise.
5530
d33472ad
GB
55312015-03-24 Gary Benson <gbenson@redhat.com>
5532
5533 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5534 (x86_linux_dr_set_addr): ...this.
5535 (x86_dr_low_get_addr): Rename to...
5536 (x86_linux_dr_get_addr): ...this.
5537 (x86_dr_low_set_control): Rename to...
5538 (x86_linux_dr_set_control): ...this.
5539 (x86_dr_low_get_control): Rename to...
5540 (x86_linux_dr_get_control): ...this.
5541 (x86_dr_low_get_status): Rename to...
5542 (x86_linux_dr_get_status): ...this.
5543 (x86_dr_low): Update with new function names.
5544
4b134ca1
GB
55452015-03-24 Gary Benson <gbenson@redhat.com>
5546
5547 * Makefile.in (x86-linux.o): New rule.
5548 * configure.srv: Add x86-linux.o to relevant targets.
5549 * linux-low.c (lwp_set_arch_private_info): New function.
5550 (lwp_arch_private_info): Likewise.
5551 * linux-x86-low.c: Include nat/x86-linux.h.
5552 (arch_lwp_info): Removed structure.
5553 (update_debug_registers_callback):
5554 Use lwp_set_debug_registers_changed.
5555 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5556 and lwp_set_debug_registers_changed.
5557 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5558
34c703da
GB
55592015-03-24 Gary Benson <gbenson@redhat.com>
5560
5561 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5562 * linux-arm-low.c (arm_new_thread): Likewise.
5563 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5564 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5565 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5566 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5567
cff068da
GB
55682015-03-24 Gary Benson <gbenson@redhat.com>
5569
5570 * linux-low.c (ptid_of_lwp): New function.
5571 (lwp_is_stopped): Likewise.
5572 (lwp_stop_reason): Likewise.
5573 * linux-x86-low.c (update_debug_registers_callback):
5574 Use lwp_is_stopped.
5575 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5576 lwp_stop_reason.
5577
b2f7c7e8
GB
55782015-03-24 Gary Benson <gbenson@redhat.com>
5579
5580 * linux-low.h (linux_stop_lwp): Remove declaration.
5581
6d4ee8c6
GB
55822015-03-24 Gary Benson <gbenson@redhat.com>
5583
5584 * linux-low.h: Include nat/linux-nat.h.
5585 * linux-low.c (iterate_over_lwps_args): New structure.
5586 (iterate_over_lwps_filter): New function.
5587 (iterate_over_lwps): Likewise.
5588 * linux-x86-low.c (update_debug_registers_callback):
5589 Update signature to what iterate_over_lwps expects.
5590 Remove PID check that iterate_over_lwps now performs.
5591 (x86_dr_low_set_addr): Use iterate_over_lwps.
5592 (x86_dr_low_set_control): Likewise.
5593
70a0bb6b
GB
55942015-03-24 Gary Benson <gbenson@redhat.com>
5595
5596 * linux-x86-low.c (x86_debug_reg_state): New function.
5597 (x86_linux_prepare_to_resume): Use the above.
5598
7b669087
GB
55992015-03-24 Gary Benson <gbenson@redhat.com>
5600
5601 * linux-low.c (current_lwp_ptid): New function.
5602 * linux-x86-low.c: Include nat/linux-nat.h.
5603 (x86_dr_low_get_addr): Use current_lwp_ptid.
5604 (x86_dr_low_get_control): Likewise.
5605 (x86_dr_low_get_status): Likewise.
5606
eef49a3d
PA
56072015-03-20 Pedro Alves <palves@redhat.com>
5608
5609 * tracepoint.c (cmd_qtstatus): Make "str" const.
5610
b2333d22
PA
56112015-03-20 Pedro Alves <palves@redhat.com>
5612
5613 * server.c (handle_general_set): Make "req_str" const.
5614
23f238d3
PA
56152015-03-19 Pedro Alves <palves@redhat.com>
5616
5617 * linux-low.c (linux_resume_one_lwp): Rename to ...
5618 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5619 instead call perror_with_name.
5620 (check_ptrace_stopped_lwp_gone): New function.
5621 (linux_resume_one_lwp): Reimplement as wrapper around
5622 linux_resume_one_lwp_throw that swallows errors if the LWP is
5623 gone.
5624
91baf43f
PA
56252015-03-19 Pedro Alves <palves@redhat.com>
5626
5627 * linux-low.c (count_events_callback, select_event_lwp_callback):
5628 No longer check whether the thread has resume_stop as last resume
5629 kind.
5630
8bf3b159
PA
56312015-03-19 Pedro Alves <palves@redhat.com>
5632
5633 * linux-low.c (count_events_callback, select_event_lwp_callback):
5634 Use the lwp's status_pending_p field, not the thread's.
5635
b90fc188
PA
56362015-03-19 Pedro Alves <palves@redhat.com>
5637
5638 * linux-low.c (select_event_lwp_callback): Update comments to
5639 no longer mention SIGTRAP.
5640
464b0089
GB
56412015-03-18 Gary Benson <gbenson@redhat.com>
5642
5643 * server.c (handle_query): Do not report vFile:fstat as supported.
5644
aa9e327f
GB
56452015-03-11 Gary Benson <gbenson@redhat.com>
5646
5647 * hostio.c (sys/types.h): New include.
5648 (sys/stat.h): Likewise.
5649 (common-remote-fileio.h): Likewise.
5650 (handle_fstat): New function.
5651 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5652
791c0056
GB
56532015-03-11 Gary Benson <gbenson@redhat.com>
5654
5655 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5656 struct stat.st_blocks and struct stat.st_blksize.
5657 * configure: Regenerate.
5658 * config.in: Likewise.
5659 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5660 (OBS): Add common-remote-fileio.o.
5661 (common-remote-fileio.o): New rule.
5662
9a9df970
PA
56632015-03-09 Pedro Alves <palves@redhat.com>
5664
5665 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5666 'struct sockaddr' pointer in 'accept' call.
5667
9eb1356e
PA
56682015-03-09 Pedro Alves <palves@redhat.com>
5669
5670 Revert:
5671 2015-03-07 Pedro Alves <palves@redhat.com>
5672 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5673 or <winsock2.h> here. Instead include "gdb_socket.h".
5674 (remote_open): Use union gdb_sockaddr_u.
5675 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5676 or <winsock2.h> here. Instead include "gdb_socket.h".
5677 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5678 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5679 or <sys/un.h>.
5680 (init_named_socket, gdb_agent_helper_thread): Use union
5681 gdb_sockaddr_u.
5682
aac331e4
PA
56832015-03-07 Pedro Alves <palves@redhat.com>
5684
5685 * configure.ac (build_warnings): Move
5686 -Wdeclaration-after-statement to the C-specific set.
5687 * configure: Regenerate.
5688
366c75fc
PA
56892015-03-07 Pedro Alves <palves@redhat.com>
5690
5691 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5692 or <winsock2.h> here. Instead include "gdb_socket.h".
5693 (remote_open): Use union gdb_sockaddr_u.
5694 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5695 or <winsock2.h> here. Instead include "gdb_socket.h".
5696 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5697 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5698 or <sys/un.h>.
5699 (init_named_socket, gdb_agent_helper_thread): Use union
5700 gdb_sockaddr_u.
5701
492d29ea
PA
57022015-03-07 Pedro Alves <palves@redhat.com>
5703
5704 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5705 instead.
5706
60a191ed
YQ
57072015-03-06 Yao Qi <yao.qi@linaro.org>
5708
5709 * linux-aarch64-low.c (aarch64_insert_point): Use
5710 show_debug_regs as a boolean.
5711 (aarch64_remove_point): Likewise.
5712
f5771b1d
PA
57132015-03-05 Pedro Alves <palves@redhat.com>
5714
5715 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5716 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5717 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5718 * nto-low.c (nto_target_ops): Likewise.
5719 * spu-low.c (spu_target_ops): Likewise.
5720 * win32-low.c (win32_target_ops): Likewise.
5721
3e572f71
PA
57222015-03-04 Pedro Alves <palves@redhat.com>
5723
72f4393d 5724 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5725 Decide whether a breakpoint triggered based on the SIGTRAP's
5726 siginfo.si_code.
72f4393d
L
5727 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5728 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5729 (linux_low_filter_event): Check for breakpoints before checking
5730 watchpoints.
5731 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5732 siginfo.si_code.
72f4393d
L
5733 (linux_stopped_by_sw_breakpoint)
5734 (linux_supports_stopped_by_sw_breakpoint)
5735 (linux_stopped_by_hw_breakpoint)
5736 (linux_supports_stopped_by_hw_breakpoint): New functions.
5737 (linux_target_ops): Install new target methods.
3e572f71 5738
1ec68e26
PA
57392015-03-04 Pedro Alves <palves@redhat.com>
5740
5741 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5742 * server.c (swbreak_feature, hwbreak_feature): New globals.
5743 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5744 (captured_main): Clear swbreak_feature and hwbreak_feature.
5745 * server.h (swbreak_feature, hwbreak_feature): Declare.
5746 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5747 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5748 supports_stopped_by_hw_breakpoint>: New fields.
5749 (target_supports_stopped_by_sw_breakpoint)
5750 (target_stopped_by_sw_breakpoint)
5751 (target_supports_stopped_by_hw_breakpoint)
5752 (target_stopped_by_hw_breakpoint): Declare.
5753
15c66dd6
PA
57542015-03-04 Pedro Alves <palves@redhat.com>
5755
5756 enum lwp_stop_reason -> enum target_stop_reason
5757 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5758 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5759 (linux_wait_1, stuck_in_jump_pad_callback)
5760 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5761 (linux_stopped_by_watchpoint):
5762 * linux-low.h (enum lwp_stop_reason): Delete.
5763 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5764 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5765
98fc70d6
YQ
57662015-03-04 Yao Qi <yao.qi@linaro.org>
5767
5768 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5769
dd2ac174
GB
57702015-03-03 Gary Benson <gbenson@redhat.com>
5771
5772 * hostio.c (handle_vFile): Fix prefix lengths.
5773
d68e53f4
MM
57742015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5775
5776 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5777 ptr_bits.
5778
bf2d68ab
AA
57792015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5780
5781 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5782 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5783 (clean): Add "rm -f" for above C files.
5784 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5785 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5786 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5787 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5788 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5789 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5790 (init_registers_s390x_vx_linux64)
5791 (init_registers_s390x_tevx_linux64)
5792 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5793 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5794 declarations.
5795 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5796 (s390_store_vxrs_high): New functions.
5797 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5798 NT_S390_VXRS_HIGH.
5799 (s390_arch_setup): Add logic for selecting one of the new target
5800 descriptions. Activate the new vector regsets if applicable.
5801 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5802 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5803 and init_registers_s390x_tevx_linux64.
5804
c966a859
PA
58052015-03-01 Pedro Alves <palves@redhat.com>
5806
5807 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5808 parameter.
5809
4180215b
PA
58102015-02-27 Pedro Alves <palves@redhat.com>
5811
5812 * linux-x86-low.c (u_debugreg_offset): New function.
5813 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5814
749bab01
PA
58152015-02-27 Pedro Alves <palves@redhat.com>
5816
5817 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5818 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5819 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5820 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5821 (ps_lsetfpregs, ps_getpid)
5822 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5823 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5824 (ps_lsetxregs, ps_plog): Declare.
5825
3c14e5a3
PA
58262015-02-27 Pedro Alves <palves@redhat.com>
5827
5828 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5829 IP_AGENT_EXPORT_FUNC.
5830 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5831 IP_AGENT_EXPORT_FUNC.
5832 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5833 (IP_AGENT_EXPORT): Delete.
5834 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5835 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5836 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5837 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5838 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5839 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5840 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5841 (traceframe_read_count, traceframe_write_count)
5842 (traceframes_created, trace_state_variables, get_raw_reg)
5843 (get_trace_state_variable_value, set_trace_state_variable_value)
5844 (ust_loaded, helper_thread_id, cmd_buf): Use
5845 IPA_SYM_EXPORTED_NAME.
5846 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5847 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5848 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5849 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5850 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5851 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5852 EXTERN_C_PUSH/EXTERN_C_POP.
5853 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5854 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5855 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5856 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5857 (traceframe_write_count, traceframe_read_count)
5858 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5859 (about_to_request_buffer_space, get_trace_state_variable_value)
5860 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5861 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5862 EXTERN_C_PUSH/EXTERN_C_POP.
5863 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5864 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5865 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5866 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5867 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5868 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5869 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5870 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5871 Define.
5872 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5873 (IP_AGENT_EXPORT_VAR_DECL): Define.
5874 (tracing): Declare.
5875 (gdb_agent_get_raw_reg): Declare.
5876
fe978cb0
PA
58772015-02-27 Tom Tromey <tromey@redhat.com>
5878 Pedro Alves <palves@redhat.com>
5879
5880 Rename symbols whose names are reserved C++ keywords throughout.
5881
3bc3d82a
PA
58822015-02-27 Pedro Alves <palves@redhat.com>
5883
5884 * Makefile.in (COMPILER): New, get it from autoconf.
5885 (CXX): Get from autoconf instead.
5886 (COMPILE.pre): Use COMPILER.
5887 (CC-LD): Rename to ...
5888 (CC_LD): ... this. Use COMPILER.
5889 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5890 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5891 * acinclude.m4: Include build-with-cxx.m4.
5892 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5893 Disable -Werror by default if building in C++ mode.
5894 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5895 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5896 the C++ compiler. Save/restore CXXFLAGS too.
5897 * configure: Regenerate.
5898
07697489
PA
58992015-02-27 Pedro Alves <palves@redhat.com>
5900
5901 * acinclude.m4: Include libiberty.m4.
5902 * configure.ac: Call libiberty_INIT.
5903 * config.in, configure: Regenerate.
5904
9beb7c4e
PA
59052015-02-26 Pedro Alves <palves@redhat.com>
5906
5907 * linux-low.c (linux_wait_1): When incrementing the PC past a
5908 program breakpoint always use the_low_target.breakpoint_len as
5909 increment, rather than the maximum between that and
5910 the_low_target.decr_pc_after_break.
5911
8090aef2
PA
59122015-02-23 Pedro Alves <palves@redhat.com>
5913
5914 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5915 thread was doing a step-over; always adjust the PC if
5916 we stepped over a permanent breakpoint.
5917 (linux_wait_1): If we stepped over breakpoint that was on top of a
5918 permanent breakpoint, manually advance the PC past it.
5919
bc9540e8
PA
59202015-02-23 Pedro Alves <palves@redhat.com>
5921
5922 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5923 modes.
5924 (x86_fill_gregset, x86_store_gregset): Use it when handling
5925 $orig_eax.
5926
2db9a427
PA
59272015-02-20 Pedro Alves <palves@redhat.com>
5928
5929 * thread-db.c: Include "nat/linux-procfs.h".
5930 (thread_db_init): Skip listing new threads if the kernel supports
5931 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5932
afa8d396
PA
59332015-02-20 Pedro Alves <palves@redhat.com>
5934
5935 * linux-low.c (status_pending_p_callback): Use ptid_match.
5936
c9587f88
AT
59372015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5938
5939 PR breakpoints/16812
5940 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5941 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5942 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5943
b05ec7a5
AT
59442015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5945
5946 PR breakpoints/15956
5947 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5948
d33501a5
MM
59492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5950
5951 * linux-low.c (linux_low_btrace_conf): Print size.
5952 * server.c (handle_btrace_conf_general_set): New.
5953 (hanle_general_set): Call handle_btrace_conf_general_set.
5954 (handle_query): Report Qbtrace-conf:bts:size as supported.
5955
f4abbc16
MM
59562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5957
5958 * linux-low.c (linux_low_enable_btrace): Update parameters.
5959 (linux_low_btrace_conf): New.
5960 (linux_target_ops)<to_btrace_conf>: Initialize.
5961 * server.c (current_btrace_conf): New.
5962 (handle_btrace_enable): Rename to ...
5963 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5964 to target_enable_btrace. Update comment. Update users.
5965 (handle_qxfer_btrace_conf): New.
5966 (qxfer_packets): Add btrace-conf entry.
5967 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5968 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5969 (target_ops)<read_btrace_conf>: New.
5970 (target_enable_btrace): Update parameters.
5971 (target_read_btrace_conf): New.
5972
043c3577
MM
59732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5974
5975 * server.c (handle_btrace_general_set): Remove call to
5976 target_supports_btrace.
5977 (supported_btrace_packets): New.
5978 (handle_query): Call supported_btrace_packets.
5979 * target.h: include btrace-common.h.
5980 (btrace_target_info): Removed.
5981 (supports_btrace, target_supports_btrace): Update parameters.
5982
734b0e4b
MM
59832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5984
5985 * Makefile.in (SFILES): Add common/btrace-common.c.
5986 (OBS): Add common/btrace-common.o.
5987 (btrace-common.o): Add build rules.
5988 * linux-low: Include btrace-common.h.
5989 (linux_low_read_btrace): Use struct btrace_data. Call
5990 btrace_data_init and btrace_data_fini.
5991
d6c146e9
PA
59922015-02-06 Pedro Alves <palves@redhat.com>
5993
5994 * thread-db.c (find_new_threads_callback): Add debug output.
5995
20ba1ce6
PA
59962015-02-04 Pedro Alves <palves@redhat.com>
5997
5998 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5999 (resume_stopped_resumed_lwps): New function.
6000 (linux_wait_for_event_filtered): Use it.
6001
8cc73a39
SDJ
60022015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6003
6004 * Makefile.in (SFILES): Add linux-personality.c.
6005 (linux-personality.o): New rule.
6006 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6007 list of objects to be built.
6008 * linux-low.c: Include nat/linux-personality.h.
6009 (linux_create_inferior): Remove code to disable address space
6010 randomization (moved to ../nat/linux-personality.c). Create
6011 cleanup to disable address space randomization.
6012
fb23d554
SDJ
60132015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6014
6015 * Makefile.in (posix-strerror.o): New rule.
6016 (mingw-strerror.o): Likewise.
6017 * configure: Regenerated.
6018 * configure.ac: Source file ../common/common.host. Initialize new
6019 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6020
cdf43629
YQ
60212015-01-14 Yao Qi <yao@codesourcery.com>
6022
6023 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6024 (ppc-linux.o): New rule.
6025 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6026 * configure.ac: AC_CHECK_FUNCS(getauxval).
6027 * config.in: Re-generated.
6028 * configure: Re-generated.
6029 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6030 ppc64_64bit_inferior_p
6031
514c5338
YQ
60322015-01-14 Yao Qi <yao@codesourcery.com>
6033
6034 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6035 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6036 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6037 (PT_ORIG_R3, PT_TRAP): Likewise.
6038 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6039 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6040 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6041
3368c1e5
JB
60422015-01-10 Joel Brobecker <brobecker@adacore.com>
6043
6044 * i387-fp.c (i387_cache_to_xsave): In look over
6045 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6046 zmmh_low_space field by use of zmmh_high_space.
6047
582511be
PA
60482015-01-09 Pedro Alves <palves@redhat.com>
6049
6050 * linux-low.c (step_over_bkpt): Move higher up in the file.
6051 (handle_extended_wait): Don't store the stop_pc here.
6052 (get_stop_pc): Adjust comments and rename to ...
6053 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6054 stopped for a software breakpoint or hardware breakpoint.
6055 (thread_still_has_status_pending_p): New function.
6056 (status_pending_p_callback): Use
6057 thread_still_has_status_pending_p. If the event is no longer
6058 interesting, resume the LWP.
6059 (handle_tracepoints): Add assert.
6060 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6061 (wstatus_maybe_breakpoint): New function.
6062 (cancel_breakpoint): Delete function.
6063 (check_stopped_by_watchpoint): New function, factored out from
6064 linux_low_filter_event.
6065 (lp_status_maybe_breakpoint): Delete function.
6066 (linux_low_filter_event): Remove filter_ptid argument.
6067 Leave thread group exits pending here. Store the LWP's stop PC.
6068 Always leave events pending.
6069 (linux_wait_for_event_filtered): Pull all events out of the
6070 kernel, and leave them all pending.
6071 (count_events_callback, select_event_lwp_callback): Consider all
6072 events.
6073 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6074 (select_event_lwp): Only give preference to the stepping LWP in
6075 all-stop mode. Adjust comments.
6076 (ignore_event): New function.
6077 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6078 references to cancel_breakpoints. Adjust to renames. Also give
6079 equal priority to all LWPs that have had events in non-stop mode.
6080 If reporting a software breakpoint event, unadjust the LWP's PC.
6081 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6082 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6083 Adjust.
6084 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6085 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6086 (linux_stopped_by_watchpoint): Adjust.
6087 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6088 * linux-low.h (enum lwp_stop_reason): New.
6089 (struct lwp_info) <stop_pc>: Adjust comment.
6090 <stopped_by_watchpoint>: Delete field.
6091 <stop_reason>: New field.
6092 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6093 * mem-break.c (software_breakpoint_inserted_here)
6094 (hardware_breakpoint_inserted_here): New function.
6095 * mem-break.h (software_breakpoint_inserted_here)
6096 (hardware_breakpoint_inserted_here): Declare.
6097 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6098 (cancel_breakpoints): Delete.
6099 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6100 (upload_fast_traceframes): Remove references to
6101 cancel_breakpoints.
6102
a33e3959
PA
61032015-01-09 Pedro Alves <palves@redhat.com>
6104
6105 * thread-db.c (find_new_threads_callback): Ignore thread if the
6106 kernel thread ID is -1.
6107
8784d563
PA
61082015-01-09 Pedro Alves <palves@redhat.com>
6109
6110 * linux-low.c (linux_attach_fail_reason_string): Move to
6111 nat/linux-ptrace.c, and rename.
6112 (linux_attach_lwp): Update comment.
6113 (attach_proc_task_lwp_callback): New function.
6114 (linux_attach): Adjust to rename and use
6115 linux_proc_attach_tgid_threads.
6116 (linux_attach_fail_reason_string): Delete declaration.
6117
76f2b779
JB
61182015-01-01 Joel Brobecker <brobecker@adacore.com>
6119
6120 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6121 * server.c (gdbserver_version): Likewise.
6122
fafcc06a
SDJ
61232014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6124
6125 * remote-utils.c: Include ctype.h.
6126 (input_interrupt): Explicitly handle the case when the char
6127 received is the NUL byte. Improve the printing of non-ASCII
6128 characters.
6129
beed38b8
JB
61302014-12-16 Joel Brobecker <brobecker@adacore.com>
6131
6132 * linux-low.c (linux_low_filter_event): Update call to
6133 linux_enable_event_reporting following the addition of
6134 a new parameter to that function.
6135
bf330350
CU
61362014-12-16 Catalin Udma <catalin.udma@freescale.com>
6137
6138 PR server/17457
6139 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6140 (AARCH64_FPCR_REGNO): Likewise.
6141 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6142 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6143 (aarch64_store_fpregset): Likewise.
6144
5227d625
JB
61452014-12-15 Joel Brobecker <brobecker@adacore.com>
6146
6147 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6148 Remove FIXME comment about assumption about N.
6149
f93b65a0
JB
61502014-12-13 Joel Brobecker <brobecker@adacore.com>
6151
6152 * configure.ac: If large-file support is disabled in GDBserver,
6153 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6154 * configure: Regenerate.
6155
e5a9158d
AA
61562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6157
6158 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6159 warning upon ENODATA from ptrace.
6160 * linux-s390-low.c (s390_store_tdb): New.
6161 (s390_regsets): Add regset for NT_S390_TDB.
6162
feea5f36
AA
61632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6164
6165 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6166 without a fill_function.
6167 * linux-s390-low.c (s390_fill_last_break): Remove.
6168 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6169 (s390_arch_setup): Use regset's size instead of fill_function for
6170 loop end condition.
6171
098dbe61
AA
61722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6173
6174 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6175 the regset's store function when ptrace returned an error.
6176 * regcache.c (get_thread_regcache): Invalidate register cache
6177 before fetching inferior's registers.
6178
28eef672
AA
61792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6180
6181 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6182 while-loop as for-loop.
6183 (regsets_store_inferior_registers): Likewise.
6184
bdca27a2
YQ
61852014-11-28 Yao Qi <yao@codesourcery.com>
6186
6187 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6188 * config.in, configure: Re-generate.
6189 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6190 is defined.
6191
9c232dda
YQ
61922014-11-21 Yao Qi <yao@codesourcery.com>
6193
6194 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6195 (AC_CHECK_HEADERS): Remove malloc.h.
6196 * configure: Re-generated.
6197 * config.in: Re-generated.
6198 * server.h: Don't include alloca.h and malloc.h.
6199 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6200 Don't include malloc.h.
6201
43968415
JB
62022014-11-17 Joel Brobecker <brobecker@adacore.com>
6203
6204 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6205 corresponding ERRNO check in same block.
6206
40e91bc7
PA
62072014-11-12 Pedro Alves <palves@redhat.com>
6208
6209 * server.c (cont_thread): Update comment.
6210 (start_inferior, attach_inferior): No longer clear cont_thread.
6211 (handle_v_cont): No longer set cont_thread.
6212 (captured_main): Clear cont_thread each time a GDB connects.
6213
c2c118cf
PA
62142014-11-12 Pedro Alves <palves@redhat.com>
6215
6216 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6217 thread, and don't resume all threads if the Hc thread has exited.
6218
78708b7c
PA
62192014-11-12 Pedro Alves <palves@redhat.com>
6220
6221 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6222 the process group instead of to a specific LWP.
6223
a2abc7de
PA
62242014-10-15 Pedro Alves <palves@redhat.com>
6225
6226 PR server/17487
6227 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6228 parameter.
6229 (arm_set_thread_context): Delete.
6230 (the_low_target): Adjust.
6231 * win32-i386-low.c (debug_registers_changed)
6232 (debug_registers_used): Delete.
6233 (update_debug_registers_callback): New function.
6234 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6235 needing to update their debug registers.
6236 (win32_get_current_dr): New function.
6237 (x86_dr_low_get_addr, x86_dr_low_get_control)
6238 (x86_dr_low_get_status): Fetch the debug register from the thread
6239 record's context.
6240 (i386_initial_stuff): Adjust.
6241 (i386_get_thread_context): Remove current_event parameter. Don't
6242 clear debug_registers_changed nor copy DR values to
6243 debug_reg_state.
6244 (i386_set_thread_context): Delete.
6245 (i386_prepare_to_resume): New function.
6246 (i386_thread_added): Mark the thread as needing to update irs
6247 debug registers.
6248 (the_low_target): Remove i386_set_thread_context and install
6249 i386_prepare_to_resume.
6250 * win32-low.c (win32_get_thread_context): Adjust.
6251 (win32_set_thread_context): Use SetThreadContext
6252 directly.
6253 (win32_prepare_to_resume): New function.
6254 (win32_require_context): New function, factored out from ...
6255 (thread_rec): ... this.
6256 (continue_one_thread): Call win32_prepare_to_resume on each thread
6257 we're about to continue.
6258 (win32_resume): Call win32_prepare_to_resume on the event thread.
6259 * win32-low.h (struct win32_thread_info)
6260 <debug_registers_changed>: New field.
6261 (struct win32_target_ops): Change prototype of set_thread_context,
6262 delete set_thread_context and add prepare_to_resume.
6263 (win32_require_context): New declaration.
6264
a442d071
GB
62652014-10-08 Gary Benson <gbenson@redhat.com>
6266
6267 * server.h: Do not include common-exceptions.h.
6268
6f1947e8
GB
62692014-10-08 Gary Benson <gbenson@redhat.com>
6270
6271 * server.h: Do not include cleanups.h.
6272
63b434a4
JH
62732014-09-30 James Hogan <james.hogan@imgtec.com>
6274
6275 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6276 mips64-dsp-linux.c.
6277
c4d9ceb6
YQ
62782014-09-23 Yao Qi <yao@codesourcery.com>
6279
6280 * linux-low.c (lp_status_maybe_breakpoint): New function.
6281 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6282 (count_events_callback): Likewise.
6283 (select_event_lwp_callback): Likewise.
6284 (cancel_breakpoints_callback): Likewise.
6285
89a5711c
DB
62862014-09-19 Don Breazeal <donb@codesourcery.com>
6287
6288 * linux-low.c (handle_extended_wait): Call
6289 linux_ptrace_get_extended_event.
6290 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6291 linux_is_extended_waitstatus.
6292
bffc0964
JB
62932014-09-16 Joel Brobecker <brobecker@adacore.com>
6294
6295 * Makefile.in (CPPFLAGS): Define.
6296 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6297 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6298
0bfdf32f
GB
62992014-09-16 Gary Benson <gbenson@redhat.com>
6300
6301 * inferiors.h (current_inferior): Renamed as...
6302 (current_thread): New variable. All uses updated.
6303 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6304 (maybe_move_out_of_jump_pad): Likewise.
6305 (cancel_breakpoint): Likewise.
6306 (linux_low_filter_event): Likewise.
6307 (wait_for_sigstop): Likewise.
6308 (linux_resume_one_lwp): Likewise.
6309 (need_step_over_p): Likewise.
6310 (start_step_over): Likewise.
6311 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6312 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6313 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6314 and save_inferior as saved_thread.
6315 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6316 saved_thread.
6317 (regcache_invalidate_thread): Likewise.
6318 * remote-utils.c (prepare_resume_reply): Likewise.
6319 * thread-db.c (thread_db_get_tls_address): Likewise.
6320 (disable_thread_event_reporting): Likewise.
6321 (remove_thread_event_breakpoints): Likewise.
6322 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6323 as saved_thread.
6324 * target.h (set_desired_inferior): Renamed as...
6325 (set_desired_thread): New declaration. All uses updated.
6326 * server.c (myresume): Updated comment to reference thread instead
6327 of inferior.
6328 (handle_serial_event): Likewise.
6329 (handle_target_event): Likewise.
6330
361c8ade
GB
63312014-09-12 Tom Tromey <tromey@redhat.com>
6332 Gary Benson <gbenson@redhat.com>
6333
6334 * regcache.h: Include common-regcache.h.
6335 (regcache_read_pc): Don't declare.
6336 * regcache.c (get_thread_regcache_for_ptid): New function.
6337
bd9269f7
GB
63382014-09-11 Tom Tromey <tromey@redhat.com>
6339 Gary Benson <gbenson@redhat.com>
6340
6341 * symbol.c: New file.
6342 * Makefile.in (SFILES): Add symbol.c.
6343 (OBS): Add symbol.o.
6344
f8c1d06b
GB
63452014-09-11 Gary Benson <gbenson@redhat.com>
6346
6347 * target.c (target_stop_ptid, target_continue_ptid): New
6348 functions.
6349
721ec300
GB
63502014-09-11 Tom Tromey <tromey@redhat.com>
6351 Gary Benson <gbenson@redhat.com>
6352
6353 * target.h: Include target/target.h.
6354 * target.c (target_read_memory, target_read_uint32)
6355 (target_write_memory): New functions.
6356
c5e92cca
GB
63572014-09-11 Gary Benson <gbenson@redhat.com>
6358
6359 * server.h (debug_hw_points): Don't declare.
6360 * server.c (debug_hw_points): Don't define. Replace all uses
6361 with show_debug_regs.
6362 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6363 all uses with show_debug_regs.
6364
2e4bb98a
EBM
63652014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6366
6367 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6368 endianness into account.
6369 (ppc_supply_ptrace_register): Likewise.
6370
ac740bc7
JH
63712014-09-03 James Hogan <james.hogan@imgtec.com>
6372
6373 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6374 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6375
97ea6506
GB
63762014-09-03 Gary Benson <gbenson@redhat.com>
6377
6378 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6379 ALL_DEBUG_ADDRESS_REGISTERS.
6380
df7e5265
GB
63812014-09-02 Gary Benson <gbenson@redhat.com>
6382
6383 * i386-low.h: Renamed as...
6384 * x86-low.h: New file. All type, function and variable name
6385 prefixes changed from "i386_" to "x86_". All references updated.
6386 * i386-low.c: Renamed as...
6387 * x86-low.c: New file. All type, function and variable name
6388 prefixes changed from "i386_" to "x86_". All references updated.
6389
ed859da7
GB
63902014-09-02 Gary Benson <gbenson@redhat.com>
6391
6392 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6393 (x86_linux_new_thread): Likewise.
6394
860789c7
GB
63952014-08-29 Gary Benson <gbenson@redhat.com>
6396
6397 * server.h (setjmp.h): Do not include.
6398 (toplevel): Do not declare.
6399 (common-exceptions.h): Include.
6400 (cleanups.h): Likewise.
6401 * server.c (toplevel): Do not define.
6402 (exit_code): New static global.
6403 (detach_or_kill_for_exit_cleanup): New function.
6404 (main): New function. Original main renamed to...
6405 (captured_main): New function.
6406 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6407
ff55e1b5
GB
64082014-08-29 Gary Benson <gbenson@redhat.com>
6409
6410 * Makefile.in (SFILES): Add common/common-exceptions.c.
6411 (OBS): Add common-exceptions.o.
6412 (common-exceptions.o): New rule.
6413 * utils.c (prepare_to_throw_exception): New function.
6414
e9bcb658
GB
64152014-08-29 Gary Benson <gbenson@redhat.com>
6416
6417 * config.in: Regenerate.
6418 * configure: Likewise.
6419
e3180625
GB
64202014-08-29 Gary Benson <gbenson@redhat.com>
6421
6422 * Makefile.in (SFILES): Add common/cleanups.c.
6423 (OBS): cleanups.o.
6424 (cleanups.o): New rule.
6425
e3d6ba5d
GB
64262014-08-29 Gary Benson <gbenson@redhat.com>
6427
6428 * utils.c (internal_vwarning): New function.
6429
7096e886
GB
64302014-08-28 Gary Benson <gbenson@redhat.com>
6431
6432 * utils.h (fatal): Remove declaration.
6433 * utils.c (fatal): Remove function.
6434
14ce3192
GB
64352014-08-28 Gary Benson <gbenson@redhat.com>
6436
6437 * tracepoint.c (gdb_agent_init): Replace fatal with
6438 perror_with_name.
6439 (initialize_tracepoint): Likewise.
6440
50278d59
GB
64412014-08-28 Gary Benson <gbenson@redhat.com>
6442
6443 * remote-utils.c (remote_prepare): Replace fatal with error.
6444
aa96c426
GB
64452014-08-28 Gary Benson <gbenson@redhat.com>
6446
6447 * linux-low.c (linux_async): Replace fatal with warning.
6448 Tidy up and return.
6449 (linux_start_non_stop): Return -1 if linux_async failed.
6450
f7160e97
GB
64512014-08-28 Gary Benson <gbenson@redhat.com>
6452
6453 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6454 gdb_assert.
6455 (i386_dr_low_get_addr): Remove vague comment.
6456 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6457 gdb_assert.
6458
38e08fca
GB
64592014-08-28 Gary Benson <gbenson@redhat.com>
6460
6461 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6462 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6463 internal_error.
6464 (linux_resume_one_lwp): Likewise.
6465 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6466 gdb_assert.
6467 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6468 with internal_error.
6469 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6470 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6471 (find_register_by_name): Replace fatal with internal_error.
6472 (find_regno): Likewise.
6473 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6474 * thread-db.c (thread_db_create_event): Likewise.
6475 (thread_db_load_search): Likewise.
6476 (try_thread_db_load_1): Likewise.
6477 * tracepoint.c (get_jump_space_head): Replace fatal with
6478 internal_error.
6479 (claim_trampoline_space): Likewise.
6480 (have_fast_tracepoint_trampoline_buffer): Likewise.
6481 (cmd_qtstart): Likewise.
6482 (stop_tracing): Likewise.
6483 (fast_tracepoint_collecting): Likewise.
6484 (target_malloc): Likewise.
6485 (download_tracepoint): Likewise.
6486 (download_trace_state_variables): Replace check with gdb_assert.
6487 (upload_fast_traceframes): Replace fatal with internal_error.
6488
34abf635
GB
64892014-08-19 Tom Tromey <tromey@redhat.com>
6490 Gary Benson <gbenson@redhat.com>
6491
6492 * Makefile.in (SFILES): Add common/common-debug.c.
6493 (OBS): Add common-debug.o.
6494 (common-debug.o): New rule.
6495 * debug.h (debug_printf): Don't declare.
6496 * debug.c (debug_printf): Renamed and rewritten as...
6497 (debug_vprintf): New function.
6498
f6e94d78
GB
64992014-08-19 Gary Benson <gbenson@redhat.com>
6500
6501 * utils.h: Do not include print-utils.h.
6502
9239eeab
GB
65032014-08-19 Tom Tromey <tromey@redhat.com>
6504 Gary Benson <gbenson@redhat.com>
6505
6506 * server.h: Add static assertion.
6507 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6508
ef87c8bb
GB
65092014-08-19 Tom Tromey <tromey@redhat.com>
6510 Gary Benson <gbenson@redhat.com>
6511
6512 * Makefile.in (SFILES): Add common/errors.c.
6513 (OBS): Add errors.o.
6514 (IPA_OBS): Add errors-ipa.o.
6515 (errors.o): New rule.
6516 (errors-ipa.o): Likewise.
6517 * utils.h (perror_with_name, error, warning): Don't declare.
6518 * utils.c (warning): Renamed and rewritten as...
6519 (vwarning): New function.
6520 (error): Renamed and rewritten as...
6521 (verror): New function.
6522 (internal_error): Renamed and rewritten as...
6523 (internal_verror): New function.
6524
bb974a24
GB
65252014-08-07 Gary Benson <gbenson@redhat.com>
6526
6527 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6528 * configure: Regenerate.
6529 * config.in: Likewise.
6530 * server.h: Do not include errno.h.
6531 * event-loop.c: Likewise.
6532 * hostio-errno.c: Likewise.
6533 * linux-low.c: Likewise.
6534 * remote-utils.c: Likewise.
6535 * spu-low.c: Likewise.
6536 * utils.c: Likewise.
6537 * gdbreplay.c: Unconditionally include errno.h.
6538
6d3d12eb
GB
65392014-08-07 Gary Benson <gbenson@redhat.com>
6540
6541 * server.h: Do not include string.h.
6542 * event-loop.c: Likewise.
6543 * linux-low.c: Likewise.
6544 * regcache.c: Likewise.
6545 * remote-utils.c: Likewise.
6546 * spu-low.c: Likewise.
6547 * utils.c: Likewise.
6548
dccbb609
GB
65492014-08-07 Gary Benson <gbenson@redhat.com>
6550
6551 * server.h: Do not include gdb_assert.h.
6552
e76df0d0
GB
65532014-08-07 Gary Benson <gbenson@redhat.com>
6554
6555 * server.h: Do not include common-utils.h.
6556
4cb9c816
GB
65572014-08-07 Gary Benson <gbenson@redhat.com>
6558
6559 * server.h: Do not include ptid.h.
6560 * notif.h: Likewise.
6561
3995eeee
GB
65622014-08-07 Gary Benson <gbenson@redhat.com>
6563
6564 * server.h: Do not include gdb_locale.h.
6565
cb9f1a9b
GB
65662014-08-07 Gary Benson <gbenson@redhat.com>
6567
6568 * server.h: Do not include gdb/signals.h.
6569 * win32-low.c: Likewise.
6570
a5fceff8
GB
65712014-08-07 Gary Benson <gbenson@redhat.com>
6572
6573 * server.h: Do not include pathmax.h.
6574
b9391142
GB
65752014-08-07 Gary Benson <gbenson@redhat.com>
6576
6577 * server.h: Do not include libiberty.h.
6578 * linux-bfin-low.c: Likewise.
6579
0e443c87
GB
65802014-08-07 Gary Benson <gbenson@redhat.com>
6581
6582 * server.h: Do not include ansidecl.h.
6583
8ebb3f56
GB
65842014-08-07 Gary Benson <gbenson@redhat.com>
6585
6586 * linux-x86-low.c: Do not include stddef.h.
6587 * lynx-ppc-low.c: Likewise.
6588 * tracepoint.c: Likewise.
6589
8980bdf6
GB
65902014-08-07 Gary Benson <gbenson@redhat.com>
6591
6592 * server.h: Do not include stdarg.h.
6593 * nto-low.c: Likewise.
6594
d7096f71
GB
65952014-08-07 Gary Benson <gbenson@redhat.com>
6596
6597 * server.h: Do not include stdlib.h.
6598 * inferiors.c: Likewise.
6599 * linux-low.c: Likewise.
6600 * regcache.c: Likewise.
6601 * spu-low.c: Likewise.
6602 * tracepoint.c: Likewise.
6603 * utils.c: Likewise.
6604
d02f550d
GB
66052014-08-07 Gary Benson <gbenson@redhat.com>
6606
6607 * server.h: Do not include stdio.h.
6608 * linux-low.c: Likewise.
6609 * remote-utils.c: Likewise.
6610 * spu-low.c: Likewise.
6611 * utils.c: Likewise.
6612 * wincecompat.c: Likewise.
6613
87f6c4e3
GB
66142014-08-06 Gary Benson <gbenson@redhat.com>
6615
6616 * regcache.c (init_register_cache): Move conditionals inside if.
6617
7089dca4
GB
66182014-08-06 Gary Benson <gbenson@redhat.com>
6619
6620 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6621
462f517e
GB
66222014-07-31 Gary Benson <gbenson@redhat.com>
6623
6624 * ax.h: Do not include server.h.
6625 * gdbthread.h: Likewise.
6626 * lynx-low.h: Likewise.
6627 * notif.h: Likewise.
6628
976411d6
GB
66292014-07-30 Gary Benson <gbenson@redhat.com>
6630
6631 * server.h: Include common-defs.h.
6632 Do not include config.h or build-gnulib-gdbserver/config.h.
6633
d41f6d8e
GB
66342014-07-30 Gary Benson <gbenson@redhat.com>
6635
6636 * hostio-errno.c: Move server.h to top of includes list.
6637 * inferiors.c: Likewise.
6638 * linux-x86-low.c: Likewise.
6639 * notif.c: Include server.h.
6640
314c6a35
TT
66412014-07-24 Tom Tromey <tromey@redhat.com>
6642 Gary Benson <gbenson@redhat.com>
6643
6644 * server.h (CORE_ADDR): Now unsigned.
6645
69ff6be5
PA
66462014-07-16 Pedro Alves <palves@redhat.com>
6647
6648 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6649
ce9e3fe7
PA
66502014-07-15 Pedro Alves <palves@redhat.com>
6651
6652 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6653 copy.
6654
e76126e8
PA
66552014-07-11 Pedro Alves <palves@redhat.com>
6656
6657 * linux-low.c (kill_wait_lwp): New function, based on
6658 kill_one_lwp_callback, but use my_waitpid directly.
6659 (kill_one_lwp_callback, linux_kill): Use it.
6660
8e9db26e
PA
66612014-06-23 Pedro Alves <palves@redhat.com>
6662
6663 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6664 before setting DR0..DR3.
6665
698b3e08
GB
66662014-06-20 Gary Benson <gbenson@redhat.com>
6667
6668 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6669 * configure: Regenerated.
6670 * config.in: Likewise.
6671
125f8a3d
GB
66722014-06-20 Gary Benson <gbenson@redhat.com>
6673
6674 * Makefile.in (SFILES): Update locations for files moved
6675 from common to nat.
6676 (object file files): Reordered.
6677
42995dbd
GB
66782014-06-20 Gary Benson <gbenson@redhat.com>
6679
6680 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6681 (i386_dr_low_set_addr): Likewise.
6682 (i386_dr_low_get_addr): Likewise.
6683 (i386_dr_low_can_set_control): Likewise.
6684 (i386_dr_low_set_control): Likewise.
6685 (i386_dr_low_get_control): Likewise.
6686 (i386_dr_low_get_status): Likewise.
6687 (i386_get_debug_register_length): Likewise.
6688 * linux-x86-low.c (i386_dr_low_set_addr):
6689 Changed signature. Made static.
6690 (i386_dr_low_get_addr): Likewise.
6691 (i386_dr_low_set_control): Likewise.
6692 (i386_dr_low_get_control): Likewise.
6693 (i386_dr_low_get_status): Likewise.
6694 (i386_dr_low): New global variable.
6695 * win32-i386-low.c (i386_dr_low_set_addr):
6696 Changed signature. Made static.
6697 (i386_dr_low_get_addr): Likewise.
6698 (i386_dr_low_set_control): Likewise.
6699 (i386_dr_low_get_control): Likewise.
6700 (i386_dr_low_get_status): Likewise.
6701 (i386_dr_low): New global variable.
6702
e1d2394b
MS
67032014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6704
6705 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6706 * Makefile.in (AR, AR_FLAGS): Define.
6707 * configure: Regenerate.
6708
3a8ee006
GB
67092014-06-19 Gary Benson <gbenson@redhat.com>
6710
6711 * Makefile.in (i386-dregs.o): New rule.
6712 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6713 * i386-low.c (target.h): Remove include.
6714 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6715 (DR_CONTROL_SHIFT): Likewise.
6716 (DR_CONTROL_SIZE): Likewise.
6717 (DR_RW_EXECUTE): Likewise.
6718 (DR_RW_WRITE): Likewise.
6719 (DR_RW_READ): Likewise.
6720 (DR_RW_IORW): Likewise.
6721 (DR_LEN_1): Likewise.
6722 (DR_LEN_2): Likewise.
6723 (DR_LEN_4): Likewise.
6724 (DR_LEN_8): Likewise.
6725 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6726 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6727 (DR_ENABLE_SIZE): Likewise.
6728 (DR_LOCAL_SLOWDOWN): Likewise.
6729 (DR_GLOBAL_SLOWDOWN): Likewise.
6730 (DR_CONTROL_RESERVED): Likewise.
6731 (I386_DR_CONTROL_MASK): Likewise.
6732 (I386_DR_VACANT): Likewise.
6733 (I386_DR_LOCAL_ENABLE): Likewise.
6734 (I386_DR_GLOBAL_ENABLE): Likewise.
6735 (I386_DR_DISABLE): Likewise.
6736 (I386_DR_SET_RW_LEN): Likewise.
6737 (I386_DR_GET_RW_LEN): Likewise.
6738 (I386_DR_WATCH_HIT): Likewise.
6739 (i386_wp_op_t): Likewise.
6740 (i386_show_dr): Likewise.
6741 (i386_length_and_rw_bits): Likewise.
6742 (i386_insert_aligned_watchpoint): Likewise.
6743 (i386_remove_aligned_watchpoint): Likewise.
6744 (i386_handle_nonaligned_watchpoint): Likewise.
6745 i386_update_inferior_debug_regs(): Likewise.
6746 (i386_dr_insert_watchpoint): Likewise.
6747 (i386_dr_remove_watchpoint): Likewise.
6748 (i386_dr_region_ok_for_watchpoint): Likewise.
6749 (i386_dr_stopped_data_address): Likewise.
6750 (i386_dr_stopped_by_watchpoint): Likewise.
6751
8f26655c
GB
67522014-06-19 Gary Benson <gbenson@redhat.com>
6753
6754 * i386-low.c (i386_dr_show): Renamed to
6755 i386_show_dr and made static. All uses updated.
6756 (i386_dr_length_and_rw_bits): Renamed to
6757 i386_length_and_rw_bits and made static.
6758 All uses updated.
6759 (i386_dr_insert_aligned_watchpoint): Renamed to
6760 i386_insert_aligned_watchpoint and made static.
6761 All uses updated.
6762 (i386_dr_remove_aligned_watchpoint): Renamed to
6763 i386_remove_aligned_watchpoint and made static.
6764 All uses updated.
6765 (i386_dr_update_inferior_debug_regs): Renamed to
6766 i386_update_inferior_debug_regs and made static.
6767 All uses updated.
6768
b9228891
GB
67692014-06-18 Gary Benson <gbenson@redhat.com>
6770
5171def3
GB
6771 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6772 (i386_dr_low_can_set_control): Likewise.
6773 (i386_get_debug_register_length): Likewise.
6774 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6775 (i386_dr_low_can_set_control): Likewise.
6776 (i386_get_debug_register_length): Likewise.
6777
67782014-06-17 Gary Benson <gbenson@redhat.com>
6779
b9228891
GB
6780 * i386-low.h (i386-dregs.h): New include.
6781 (DR_FIRSTADDR): Now in i386-dregs.h.
6782 (DR_LASTADDR): Likewise.
6783 (DR_NADDR): Likewise.
6784 (DR_STATUS): Likewise.
6785 (DR_CONTROL): Likewise.
6786 (i386_debug_reg_state): Likewise.
6787 (i386_dr_insert_watchpoint): Likewise.
6788 (i386_dr_remove_watchpoint): Likewise.
6789 (i386_dr_region_ok_for_watchpoint): Likewise.
6790 (i386_dr_stopped_data_address): Likewise.
6791 (i386_dr_stopped_by_watchpoint): Likewise.
6792 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6793
4be83cc2
GB
67942014-06-18 Gary Benson <gbenson@redhat.com>
6795
6796 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6797 i386_dr_insert_watchpoint.
6798 (i386_low_remove_watchpoint): Renamed to
6799 i386_dr_remove_watchpoint.
6800 (i386_low_region_ok_for_watchpoint): Renamed to
6801 i386_dr_region_ok_for_watchpoint.
6802 (i386_low_stopped_data_address): Renamed to
6803 i386_dr_stopped_data_address.
6804 (i386_low_stopped_by_watchpoint): Renamed to
6805 i386_dr_stopped_by_watchpoint.
6806 * i386-low.c (i386_show_dr): Renamed to
6807 i386_dr_show and made nonstatic. All uses updated.
6808 (i386_length_and_rw_bits): Renamed to
6809 i386_dr_length_and_rw_bits and made nonstatic.
6810 All uses updated.
6811 (i386_insert_aligned_watchpoint): Renamed to
6812 i386_dr_insert_aligned_watchpoint and made nonstatic.
6813 All uses updated.
6814 (i386_remove_aligned_watchpoint): Renamed to
6815 i386_dr_remove_aligned_watchpoint and made nonstatic.
6816 All uses updated.
6817 (i386_update_inferior_debug_regs): Renamed to
6818 i386_dr_update_inferior_debug_regs and made nonstatic.
6819 All uses updated.
6820 (i386_low_insert_watchpoint): Renamed to
6821 i386_dr_insert_watchpoint. All uses updated.
6822 (i386_low_remove_watchpoint): Renamed to
6823 i386_dr_remove_watchpoint. All uses updated.
6824 (i386_low_region_ok_for_watchpoint): Renamed to
6825 i386_dr_region_ok_for_watchpoint. All uses updated.
6826 (i386_low_stopped_data_address): Renamed to
6827 i386_dr_stopped_data_address. All uses updated.
6828 (i386_low_stopped_by_watchpoint): Renamed to
6829 i386_dr_stopped_by_watchpoint. All uses updated.
6830
131aa0d4
GB
68312014-06-18 Gary Benson <gbenson@redhat.com>
6832
6833 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6834 (i386_dr_low_can_set_control): Likewise.
6835 (i386_insert_aligned_watchpoint): New check.
6836
d9305f7f
GB
68372014-06-18 Gary Benson <gbenson@redhat.com>
6838
6839 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6840 Renamed to state.
6841
e927c9fc
GB
68422014-06-18 Gary Benson <gbenson@redhat.com>
6843
6844 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6845 instead of fatal and error.
6846 (i386_handle_nonaligned_watchpoint): Likewise.
6847
1b6d4134
GB
68482014-06-18 Gary Benson <gbenson@redhat.com>
6849
6850 * i386-low.c (i386_get_debug_register_length): New macro.
6851 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6852 (i386_show_dr): Use debug_printf instead of fprintf. Use
6853 phex to format values.
6854
6e62758f
GB
68552014-06-18 Gary Benson <gbenson@redhat.com>
6856
6857 * i386-low.h: Comment changes.
6858 * i386-low.c: Likewise.
6859
fc6e2f03
GB
68602014-06-18 Gary Benson <gbenson@redhat.com>
6861
6862 * i386-low.c: Whitespace changes.
6863
f9d1eeed
TT
68642014-06-12 Tom Tromey <tromey@redhat.com>
6865
6866 * utils.c (freeargv): Remove.
6867
0b04e523
TT
68682014-06-12 Tom Tromey <tromey@redhat.com>
6869
6870 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6871 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6872 (parse_debug_format_options): Likewise.
6873 (gdbserver_usage): Likewise.
6874 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6875 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6876 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6877 against libiberty.
6878 ($(LIBGNU)): Depend on libiberty.
6879 (all-lib): Recurse into all subdirs.
6880 (install-only): Invoke "install" target in subdirs.
6881 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6882 targets.
6883 * configure: Rebuild.
6884 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6885 for vasprintf, vsnprintf, or gettimeofday.
6886 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6887 srv_tgtobj.
6888
270c9937
JB
68892014-06-05 Joel Brobecker <brobecker@adacore.com>
6890
6891 * development.sh: Delete.
6892 * Makefile.in (config.status): Adjust dependency on development.sh.
6893 * configure.ac: Adjust development.sh source call.
6894 * configure: Regenerate.
6895
0a261ed8
PA
68962014-06-02 Pedro Alves <palves@redhat.com>
6897
6898 * ax.c (gdb_free_agent_expr): New function.
6899 * ax.h (gdb_free_agent_expr): New declaration.
6900 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6901 list.
6902 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6903 static.
6904 (clear_breakpoint_conditions_and_commands): New function.
6905 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6906 (clear_breakpoint_conditions_and_commands): New declaration.
6907
e9dae05e
RR
69082014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6909
6910 * linux-aarch64-low.c (asm/ptrace.h): Include.
6911
5876f503
JK
69122014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6913
6914 Fix TLS access for -static -pthread.
6915 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6916 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6917 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6918
802e8e6d
PA
69192014-05-20 Pedro Alves <palves@redhat.com>
6920
6921 * linux-aarch64-low.c (aarch64_insert_point)
6922 (aarch64_remove_point): No longer check whether the type is
6923 supported here. Adjust to new interface.
6924 (the_low_target): Install aarch64_supports_z_point_type as
6925 supports_z_point_type method.
6926 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6927 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6928 instead of a Z packet char. Adjust.
6929 (arm_supports_z_point_type): New function.
6930 (arm_insert_point, arm_remove_point): Adjust to new interface.
6931 (the_low_target): Install arm_supports_z_point_type.
6932 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6933 (cris_insert_point, cris_remove_point): Adjust to new interface.
6934 Don't check whether the type is supported here.
6935 (the_low_target): Install cris_supports_z_point_type.
6936 * linux-low.c (linux_supports_z_point_type): New function.
6937 (linux_insert_point, linux_remove_point): Adjust to new interface.
6938 * linux-low.h (struct linux_target_ops) <insert_point,
6939 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6940 raw_breakpoint pointer parameter.
6941 <supports_z_point_type>: New method.
6942 * linux-mips-low.c (mips_supports_z_point_type): New function.
6943 (mips_insert_point, mips_remove_point): Adjust to new interface.
6944 Use mips_supports_z_point_type.
6945 (the_low_target): Install mips_supports_z_point_type.
6946 * linux-ppc-low.c (the_low_target): Install NULL as
6947 supports_z_point_type method.
6948 * linux-s390-low.c (the_low_target): Install NULL as
6949 supports_z_point_type method.
6950 * linux-sparc-low.c (the_low_target): Install NULL as
6951 supports_z_point_type method.
6952 * linux-x86-low.c (x86_supports_z_point_type): New function.
6953 (x86_insert_point): Adjust to new insert_point interface. Use
6954 insert_memory_breakpoint. Adjust to new
6955 i386_low_insert_watchpoint interface.
6956 (x86_remove_point): Adjust to remove_point interface. Use
6957 remove_memory_breakpoint. Adjust to new
6958 i386_low_remove_watchpoint interface.
6959 (the_low_target): Install x86_supports_z_point_type.
6960 * lynx-low.c (lynx_target_ops): Install NULL as
6961 supports_z_point_type callback.
6962 * nto-low.c (nto_supports_z_point_type): New.
6963 (nto_insert_point, nto_remove_point): Adjust to new interface.
6964 (nto_target_ops): Install nto_supports_z_point_type.
6965 * mem-break.c: Adjust intro comment.
6966 (struct raw_breakpoint) <raw_type, size>: New fields.
6967 <inserted>: Update comment.
6968 <shlib_disabled>: Delete field.
6969 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6970 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6971 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6972 (raw_bkpt_type_to_target_hw_bp_type): New function.
6973 (find_enabled_raw_code_breakpoint_at): New function.
6974 (find_raw_breakpoint_at): New type and size parameters. Use them.
6975 (insert_memory_breakpoint): New function, based off
6976 set_raw_breakpoint_at.
6977 (remove_memory_breakpoint): New function.
6978 (set_raw_breakpoint_at): Reimplement.
6979 (set_breakpoint): New, based on set_breakpoint_at.
6980 (set_breakpoint_at): Reimplement.
6981 (delete_raw_breakpoint): Go through the_target->remove_point
6982 instead of assuming memory breakpoints.
6983 (find_gdb_breakpoint_at): Delete.
6984 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6985 (find_gdb_breakpoint): New function.
6986 (set_gdb_breakpoint_at): Delete.
6987 (z_type_supported): New function.
6988 (set_gdb_breakpoint_1): New function, loosely based off
6989 set_gdb_breakpoint_at.
6990 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6991 (delete_gdb_breakpoint_at): Delete.
6992 (delete_gdb_breakpoint_1): New function, loosely based off
6993 delete_gdb_breakpoint_at.
6994 (delete_gdb_breakpoint): New function.
6995 (clear_gdb_breakpoint_conditions): Rename to ...
6996 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6997 breakpoint.
6998 (add_condition_to_breakpoint): Make static.
6999 (add_breakpoint_condition): Take a struct breakpoint pointer
7000 instead of an address. Adjust.
7001 (gdb_condition_true_at_breakpoint): Rename to ...
7002 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7003 z_type parameter.
7004 (gdb_condition_true_at_breakpoint): Reimplement.
7005 (add_breakpoint_commands): Take a struct breakpoint pointer
7006 instead of an address. Adjust.
7007 (gdb_no_commands_at_breakpoint): Rename to ...
7008 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7009 parameter. Return true if no breakpoint was found. Change debug
7010 output.
7011 (gdb_no_commands_at_breakpoint): Reimplement.
7012 (run_breakpoint_commands): Rename to ...
7013 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7014 and change return type to boolean.
7015 (run_breakpoint_commands): New function.
7016 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7017 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7018 breakpoint. Go through the_target->remove_point instead of
7019 assuming memory breakpoint.
7020 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7021 software and hardware breakpoints.
7022 (reinsert_raw_breakpoint): Go through the_target->insert_point
7023 instead of assuming memory breakpoint.
7024 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7025 software and hardware breakpoints.
7026 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7027 Check both software and hardware breakpoints.
7028 (validate_inserted_breakpoint): Assert the breakpoint is a
7029 software breakpoint. Set the inserted flag to -1 instead of
7030 setting shlib_disabled.
7031 (delete_disabled_breakpoints): Adjust.
7032 (validate_breakpoints): Only validate software breakpoints.
7033 Adjust to inserted flag change.
7034 (check_mem_read, check_mem_write): Skip breakpoint types other
7035 than software breakpoints. Adjust to inserted flag change.
7036 * mem-break.h (enum raw_bkpt_type): New enum.
7037 (raw_breakpoint, struct process_info): Forward declare.
7038 (Z_packet_to_target_hw_bp_type): Delete declaration.
7039 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7040 (set_gdb_breakpoint, delete_gdb_breakpoint)
7041 (clear_breakpoint_conditions): New declarations.
7042 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7043 (breakpoint_inserted_here): Update comment.
7044 (add_breakpoint_condition, add_breakpoint_commands): Replace
7045 address parameter with a breakpoint pointer parameter.
7046 (gdb_breakpoint_here): Update comment.
7047 (delete_gdb_breakpoint_at): Delete.
7048 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7049 * server.c (process_point_options): Take a struct breakpoint
7050 pointer instead of an address. Adjust.
7051 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7052 delete_gdb_breakpoint.
7053 * spu-low.c (spu_target_ops): Install NULL as
7054 supports_z_point_type method.
7055 * target.h: Include mem-break.h.
7056 (struct target_ops) <prepare_to_access_memory>: Update comment.
7057 <supports_z_point_type>: New field.
7058 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7059 instead of a char. Also take a raw breakpoint pointer.
7060 * win32-arm-low.c (the_low_target): Install NULL as
7061 supports_z_point_type.
7062 * win32-i386-low.c (i386_supports_z_point_type): New function.
7063 (i386_insert_point, i386_remove_point): Adjust to new interface.
7064 (the_low_target): Install i386_supports_z_point_type.
7065 * win32-low.c (win32_supports_z_point_type): New function.
7066 (win32_insert_point, win32_remove_point): Adjust to new interface.
7067 (win32_target_ops): Install win32_supports_z_point_type.
7068 * win32-low.h (struct win32_target_ops):
7069 <supports_z_point_type>: New method.
7070 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7071 instead of a char. Also take a raw breakpoint pointer.
7072
932539e3
PA
70732014-05-20 Pedro Alves <palves@redhat.com>
7074
7075 * mem-break.h: Include break-common.h.
7076 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7077 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7078 (Z_packet_to_target_hw_bp_type): New declaration.
7079 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7080 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7081 (Z_PACKET_ACCESS_WP): Delete macros.
7082 (Z_packet_to_hw_type): Delete function.
7083 * i386-low.h: Don't include break-common.h here.
7084 (Z_packet_to_hw_type): Delete declaration.
7085 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7086 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7087 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7088 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7089 * linux-aarch64-low.c: Don't include break-common.h here.
7090 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7091 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7092 (Z_packet_to_target_hw_bp_type): Delete function.
7093 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7094 function.
7095 (mips_insert_point, mips_remove_point): Use
7096 Z_packet_to_target_hw_bp_type.
7097
4ff0d3d8
PA
70982014-05-20 Pedro Alves <palves@redhat.com>
7099
7100 * linux-aarch64-low.c: Include break-common.h.
7101 (enum target_point_type): Delete.
7102 (Z_packet_to_point_type): Rename to ...
7103 (Z_packet_to_target_hw_bp_type): ... this, and return a
7104 target_hw_bp_type instead.
7105 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7106 instead of an enum target_point_type.
7107 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7108 breakpoint type.
7109 (aarch64_dr_state_insert_one_point)
7110 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7111 (aarch64_handle_aligned_watchpoint)
7112 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7113 Take an enum target_hw_bp_type instead of an enum
7114 target_point_type.
7115 (aarch64_supports_z_point_type): New function.
7116 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7117 use Z_packet_to_target_hw_bp_type.
7118
786dc519
JB
71192014-05-20 Joel Brobecker <brobecker@adacore.com>
7120
7121 * configure.ac: Only use -Werror by default when DEVELOPMENT
7122 is true.
7123 * configure: Regenerate.
7124
9e0aa64f
JK
71252014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7126
7127 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7128 * linux-x86-low.c (X86_64_USER_REGS): New.
7129 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7130
2b577b92
YQ
71312014-04-28 Yao Qi <yao@codesourcery.com>
7132
7133 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7134 name.
7135
94611da2
PA
71362014-04-25 Pedro Alves <palves@redhat.com>
7137
7138 PR server/16255
7139 * linux-low.c (linux_attach_fail_reason_string): New function.
7140 (linux_attach_lwp): Delete.
7141 (linux_attach_lwp_1): Rename to ...
7142 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7143 argument. Remove "initial" parameter. Return int instead of
7144 void. Don't error or warn here.
7145 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7146 failure to attach to the tgid. Call warning when failing to
7147 attach to an lwp.
7148 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7149 argument. Remove "initial" parameter. Return int instead of
7150 void. Don't error or warn here.
7151 (linux_attach_fail_reason_string): New declaration.
7152 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7153 interface change. Use linux_attach_fail_reason_string.
7154
01f9f808
MS
71552014-04-24 Michael Sturm <michael.sturm@mintel.com>
7156 Walfred Tedeschi <walfred.tedeschi@intel.com>
7157
7158 * Makefile.in: Added rules to handle new files
7159 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7160 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7161 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7162 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7163 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7164 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7165 x32-avx512-linux.o.
7166 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7167 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7168 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7169 i386/x32-avx512.xml.
7170 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7171 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7172 i386/x32-avx512-linux.xml.
7173 * i387-fp.c (num_avx512_k_registers): New constant for number
7174 of K registers.
7175 (num_avx512_zmmh_low_registers): New constant for number of
7176 lower ZMM registers (0-15).
7177 (num_avx512_zmmh_high_registers): New constant for number of
7178 higher ZMM registers (16-31).
7179 (num_avx512_ymmh_registers): New contant for number of higher
7180 YMM registers (ymm16-31 added by avx521 on x86_64).
7181 (num_avx512_xmm_registers): New constant for number of higher
7182 XMM registers (xmm16-31 added by AVX512 on x86_64).
7183 (struct i387_xsave): Add space for AVX512 registers.
7184 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7185 Add code to handle AVX512 registers.
7186 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7187 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7188 prototypei from generated file.
7189 (tdesc_amd64_avx512_linux): Likewise.
7190 (init_registers_x32_avx512_linux): Likewise.
7191 (tdesc_x32_avx512_linux): Likewise.
7192 (init_registers_i386_avx512_linux): Likewise.
7193 (tdesc_i386_avx512_linux): Likewise.
7194 (x86_64_regmap): Add AVX512 registers.
7195 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7196 mask.
7197 (initialize_low_arch): Add code to initialize AVX512 registers.
7198
51aa91f9
PA
71992014-04-23 Pedro Alves <palves@redhat.com>
7200
7201 * mem-break.c (find_gdb_breakpoint_at): Make static.
7202 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7203
a4165e94
PA
72042014-04-23 Pedro Alves <palves@redhat.com>
7205
7206 * i386-low.c: Don't include break-common.h here.
7207 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7208 prototype to take target_hw_bp_type as argument instead of a Z
7209 packet char.
7210 * i386-low.h: Include break-common.h here.
7211 (Z_packet_to_hw_type): Declare.
7212 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7213 prototypes.
7214 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7215 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7216 (x86_remove_point): Convert the packet number to a
7217 target_hw_bp_type before calling i386_low_remove_watchpoint.
7218 * win32-i386-low.c (i386_insert_point): Convert the packet number
7219 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7220 (i386_remove_point): Convert the packet number to a
7221 target_hw_bp_type before calling i386_low_remove_watchpoint.
7222
b8acf843
PA
72232014-04-23 Pedro Alves <palves@redhat.com>
7224
7225 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7226
d708bcd1
PA
72272014-04-10 Pedro Alves <palves@redhat.com>
7228
7229 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7230 Check if the condition or command is NULL before checking if the
7231 breakpoint is known. On success, return true.
7232 * mem-break.h (add_breakpoint_condition): Document return.
7233 (add_breakpoint_commands): Add describing comment.
7234 * server.c (skip_to_semicolon): New function.
7235 (process_point_options): Use it.
7236
2eec7d5b
PA
72372014-04-09 Pedro Alves <palves@redhat.com>
7238
7239 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7240 to lwpid_of.
7241
fa96cb38
PA
72422014-02-27 Pedro Alves <palves@redhat.com>
7243
7244 PR 12702
7245 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7246 macros.
7247 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7248 output.
7249 (last_thread_of_process_p): Take a PID argument instead of a
7250 thread pointer.
7251 (linux_wait_for_lwp): Delete.
7252 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7253 functions.
7254 (linux_low_filter_event): New function, party factored out from
7255 linux_wait_for_event.
7256 (linux_wait_for_event): Rename to ...
7257 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7258 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7259 sigsuspend. Check for zombie leaders.
7260 (linux_wait_for_event): Reimplement as wrapper around
7261 linux_wait_for_event_filtered.
7262 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7263 a normal or signal exit is seen, it's the whole process exiting.
7264 (wait_for_sigstop): No longer a for_each_inferior callback.
7265 Rewrite on top of linux_wait_for_event_filtered.
7266 (stop_all_lwps): Call wait_for_sigstop directly.
7267 * server.c (resume, handle_target_event): Handle
7268 TARGET_WAITKIND_NO_RESUMED.
7269
d763de10
JB
72702014-02-26 Joel Brobecker <brobecker@adacore.com>
7271
7272 * win32-low.c (psapi_get_dll_name,
7273 * win32_CreateToolhelp32Snapshot): Delete.
7274 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7275 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7276 Delete.
7277 (handle_load_dll): Add function description.
7278 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7279
850a0f76
JB
72802014-02-26 Joel Brobecker <brobecker@adacore.com>
7281
7282 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7283 Add comment.
7284 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7285 base address when calling win32_add_one_solib.
7286 (handle_load_dll): Delete local variable load_addr.
7287 Remove 0x1000 offset applied to DLL base address when calling
7288 win32_add_one_solib.
7289 (handle_unload_dll): Add comment.
7290
f25b3fc3
JB
72912014-02-26 Joel Brobecker <brobecker@adacore.com>
7292
7293 * win32-low.c (win32_add_all_dlls): Renames
7294 win32_ensure_ntdll_loaded. Rewrite function documentation.
7295 Adjust implementation to always load all DLLs.
7296 Add 0x1000 offset to DLL base address when calling
7297 win32_add_one_solib.
7298 (child_initialization_done): New static global.
7299 (do_initial_child_stuff): Set child_initialization_done to
7300 zero during child initialization, and 1 after. Replace call
7301 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7302 Add comment.
7303 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7304 (handle_unload_dll): Add function documentation.
7305 (get_child_debug_event): Ignore load and unload DLL events
7306 during child initialization.
7307
d86d4aaf
DE
73082014-02-20 Doug Evans <dje@google.com>
7309
3bc32da3 7310 Remove global all_lwps.
d86d4aaf
DE
7311 * inferiors.h (ptid_of): Move here from linux-low.h.
7312 (pid_of, lwpid_of): Ditto.
7313 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7314 parameter is a struct thread_info * now.
7315 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7316 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7317 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7318 directly.
7319 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7320 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7321 * linux-arm-low.c (update_registers_callback): Update, "entry"
7322 parameter is a struct thread_info * now.
7323 Fetch lwpid from current_inferior directly.
7324 (arm_insert_point): Pass &all_threads to find_inferior instead of
7325 &all_lwps.
7326 (arm_remove_point): Ditto.
7327 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7328 (arm_prepare_to_resume): Fetch pid from thread.
7329 (arm_read_description): Fetch lwpid from current_inferior directly.
7330 * linux-low.c (all_lwps): Delete.
7331 (delete_lwp): Delete call to remove_inferior.
7332 (handle_extended_wait): Fetch lwpid from thread.
7333 (add_lwp): Don't set lwp->entry.id. Remove call to
7334 add_inferior_to_list.
7335 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7336 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7337 (kill_one_lwp_callback): Ditto.
7338 (linux_kill): Don't dereference NULL pointer.
7339 Fetch ptid,lwpid from thread.
7340 (get_detach_signal): Fetch ptid from thread.
7341 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7342 Simplify call to regcache_invalidate_thread.
7343 (delete_lwp_callback): Update, "entry" parameter is a
7344 struct thread_info * now. Fetch pid from thread.
7345 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7346 (status_pending_p_callback): Update, "entry" parameter is a
7347 struct thread_info * now. Fetch ptid from thread.
7348 (find_lwp_pid): Update, "entry" parameter is a
7349 struct thread_info * now.
7350 (linux_wait_for_lwp): Fetch pid from thread.
7351 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7352 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7353 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7354 (dequeue_one_deferred_signal): Ditto.
7355 (cancel_breakpoint): Fetch ptid from current_inferior.
7356 (linux_wait_for_event): Pass &all_threads to find_inferior,
7357 not &all_lwps. Fetch ptid, lwpid from thread.
7358 (count_events_callback): Update, "entry" parameter is a
7359 struct thread_info * now.
7360 (select_singlestep_lwp_callback): Ditto.
7361 (select_event_lwp_callback): Ditto.
7362 (cancel_breakpoints_callback): Ditto.
7363 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7364 not &all_lwps.
7365 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7366 (unsuspend_one_lwp): Update, "entry" parameter is a
7367 struct thread_info * now.
7368 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7369 not &all_lwps.
7370 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7371 Fetch lwpid from thread, not lwp.
7372 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7373 Pass &all_threads to find_inferior, not &all_lwps.
7374 (send_sigstop): Fetch lwpid from thread, not lwp.
7375 (send_sigstop_callback): Update, "entry" parameter is a
7376 struct thread_info * now.
7377 (suspend_and_send_sigstop_callback): Ditto.
7378 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7379 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7380 struct thread_info * now.
7381 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7382 from thread, lwp.
7383 (lwp_running): Update, "entry" parameter is a
7384 struct thread_info * now.
7385 (stop_all_lwps): Fetch ptid from thread.
7386 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7387 (linux_resume_one_lwp): Fetch lwpid from thread.
7388 (linux_set_resume_request): Update, "entry" parameter is a
7389 struct thread_info * now. Fetch pid, lwpid from thread.
7390 (resume_status_pending_p): Update, "entry" parameter is a
7391 struct thread_info * now.
7392 (need_step_over_p): Ditto. Fetch lwpid from thread.
7393 (start_step_over): Fetch lwpid from thread.
7394 (linux_resume_one_thread): Update, "entry" parameter is a
7395 struct thread_info * now. Fetch lwpid from thread.
7396 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7397 (proceed_one_lwp): Update, "entry" parameter is a
7398 struct thread_info * now. Fetch lwpid from thread.
7399 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7400 struct thread_info * now.
7401 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7402 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7403 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7404 directly.
7405 (regsets_store_inferior_registers): Ditto.
7406 (fetch_register, store_register): Ditto.
7407 (linux_read_memory, linux_write_memory): Ditto.
7408 (linux_request_interrupt): Ditto.
7409 (linux_read_auxv): Ditto.
7410 (linux_xfer_siginfo): Ditto.
7411 (linux_qxfer_spu): Ditto.
7412 (linux_qxfer_libraries_svr4): Ditto.
7413 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7414 moved to inferiors.h.
7415 (get_lwp): Delete.
7416 (get_thread_lwp): Update.
7417 (struct lwp_info): Delete member "entry". Simplify comment for
7418 member "thread".
7419 (all_lwps): Delete.
7420 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7421 current_inferior directly.
7422 (update_watch_registers_callback): Update, "entry" parameter is a
7423 struct thread_info * now. Fetch pid from thread.
7424 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7425 (mips_insert_point): Fetch lwpid from current_inferior.
7426 Pass &all_threads to find_inferior, not &all_lwps.
7427 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7428 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7429 directly.
7430 (mips_stopped_data_address): Ditto.
7431 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7432 directly.
7433 * linux-tile-low.c (tile_arch_setup): Ditto.
7434 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7435 (update_debug_registers_callback): Update, "entry" parameter is a
7436 struct thread_info * now. Fetch pid from thread.
7437 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7438 Pass &all_threads to find_inferior, not &all_lwps.
7439 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7440 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7441 Pass &all_threads to find_inferior, not &all_lwps.
7442 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7443 (i386_dr_low_get_status): Ditto.
7444 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7445 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7446 (x86_linux_read_description): Ditto.
7447 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7448
3b8361aa
DE
74492014-02-20 Doug Evans <dje@google.com>
7450
7451 * inferiors.c (get_first_inferior): Fix buglet.
7452
f7667f0d
DE
74532014-02-19 Doug Evans <dje@google.com>
7454
7455 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7456 * inferiors.c (add_thread): Change result type to struct thread_info *.
7457 All callers updated.
7458 (add_lwp): Call add_thread here instead of in callers.
7459 All callers updated.
7460 * linux-low.h (get_lwp_thread): Rewrite.
7461 (struct lwp_info): New member "thread".
7462
b3312d80
DE
74632014-02-19 Doug Evans <dje@google.com>
7464
7465 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7466 All callers updated.
7467
ecc6f45c
DE
74682014-02-19 Doug Evans <dje@google.com>
7469
7470 * inferiors.c (add_thread): Fix whitespace.
7471
649ebbca
DE
74722014-02-19 Doug Evans <dje@google.com>
7473
7474 * dll.c (clear_dlls): Replace accessing list implemention details
7475 with API function.
7476 * gdbthread.h (get_first_thread): Declare.
7477 * inferiors.c (for_each_inferior_with_data): New function.
7478 (get_first_thread): New function.
7479 (find_thread_ptid): Simplify.
7480 (get_first_inferior): New function.
7481 (clear_list): Delete.
7482 (one_inferior_p): New function.
7483 (clear_inferior_list): New function.
7484 (clear_inferiors): Update.
7485 * inferiors.h (for_each_inferior_with_data): Declare.
7486 (clear_inferior_list): Declare.
7487 (one_inferior_p): Declare.
7488 (get_first_inferior): Declare.
7489 * linux-low.c (linux_wait_for_event): Replace accessing list
7490 implemention details with API function.
7491 * server.c (target_running): Ditto.
7492 (accumulate_file_name_length): New function.
7493 (emit_dll_description): New function.
7494 (handle_qxfer_libraries): Replace accessing list implemention
7495 details with API function.
7496 (handle_qxfer_threads_worker): New function.
7497 (handle_qxfer_threads_proper): Replace accessing list implemention
7498 details with API function.
7499 (handle_query): Ditto.
7500 (visit_actioned_threads_callback_ftype): New typedef.
7501 (visit_actioned_threads_data): New struct.
7502 (visit_actioned_threads): Rewrite to be find_inferior callback.
7503 (resume): Call find_inferior.
7504 (handle_status): Replace accessing list implemention
7505 details with API function.
7506 (process_serial_event): Replace accessing list implemention details
7507 with API function.
7508 * target.c (set_desired_inferior): Replace accessing list implemention
7509 details with API function.
7510 * tracepoint.c (same_process_p): New function.
7511 (gdb_agent_about_to_close): Replace accessing list implemention
7512 details with API function.
7513 * win32-low.c (child_delete_thread): Replace accessing list
7514 implemention details with API function.
7515 (match_dll_by_basename): New function.
7516 (dll_is_loaded_by_basename): New function.
7517 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7518 details call to dll_is_loaded_by_basename.
7519
80894984
DE
75202014-02-19 Doug Evans <dje@google.com>
7521
7522 * dll.h (struct dll_info): Add comment.
7523 * gdbthread.h (struct thread_info): Add comment.
7524 (current_ptid): Simplify.
7525 * inferiors.c (add_process): Update.
7526 (remove_process): Update.
7527 * inferiors.h (struct process_info): Rename member "head" to "entry".
7528 * linux-low.c (delete_lwp): Update.
7529 (add_lwp): Update.
7530 (last_thread_of_process_p): Update.
7531 (kill_one_lwp_callback, linux_kill): Update.
7532 (status_pending_p_callback): Update.
7533 (wait_for_sigstop): Update. Simplify read of ptid.
7534 (start_step_over): Update.
7535 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7536 (get_lwp_thread): Update.
7537 (struct lwp_info): Rename member "head" to "entry".
7538 * regcache.h (inferior_list_entry): Delete.
7539 * server.c (kill_inferior_callback): Update.
7540 (detach_or_kill_inferior_callback): Update.
7541 (print_started_pid): Update.
7542 (print_attached_pid): Update.
7543 (process_serial_event): Simplify read of ptid.
7544 * thread-db.c (thread_db_create_event): Update.
7545 (thread_db_get_tls_address): Update.
7546 * win32-low.c (current_inferior_ptid): Simplify.
7547
46917d26
TT
75482014-02-19 Tom Tromey <tromey@redhat.com>
7549
7550 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7551 argument.
7552 (target_supports_btrace): Update.
7553
0759a81e
YQ
75542014-02-14 Yao Qi <yao@codesourcery.com>
7555
7556 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7557 (rsp-low-ipa.o): New target.
7558
a7191e8b
TT
75592014-02-12 Tom Tromey <tromey@redhat.com>
7560
7561 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7562 convert_ascii_to_int.
7563 * regcache.c (registers_to_string): Likewise.
7564 * remote-utils.c (decode_M_packet): Likewise.
7565 * server.c (process_serial_event): Likewise.
7566
ff0e980e
TT
75672014-02-12 Tom Tromey <tromey@redhat.com>
7568
7569 * server.c (handle_query, handle_v_run): Use hex2bin, not
7570 unhexify.
7571 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7572
e9371aff
TT
75732014-02-12 Tom Tromey <tromey@redhat.com>
7574
7575 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7576 convert_int_to_ascii.
7577 * regcache.c (registers_to_string, collect_register_as_string):
7578 Likewise.
7579 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7580 Likewise.
7581 * server.c (process_serial_event): Likewise.
7582 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7583 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7584
971dc0b8
TT
75852014-02-12 Tom Tromey <tromey@redhat.com>
7586
7587 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7588 bin2hex, not hexify.
7589 * tracepoint.c (cmd_qtstatus): Likewise.
7590
0a822afb
TT
75912014-02-12 Tom Tromey <tromey@redhat.com>
7592
7593 * remote-utils.c (monitor_output): Pass explicit length to
7594 hexify.
7595
9c3d6531
TT
75962014-02-12 Tom Tromey <tromey@redhat.com>
7597
7598 * tracepoint.c: Include rsp-low.h.
7599 * server.c: Include rsp-low.h.
7600 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7601 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7602 declare.
7603 * remote-utils.c: Include rsp-low.h.
7604 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7605 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7606 (convert_int_to_ascii, convert_ascii_to_int): Move to
7607 common/rsp-low.c.
7608 * regcache.c: Include rsp-low.h.
7609 * ax.c: Include rsp-low.h.
7610 * Makefile.in (SFILES): Add common/rsp-low.c.
7611 (OBS): Add rsp-low.o.
7612 (rsp-low.o): New target.
7613
01fd3ea5
TT
76142014-02-12 Tom Tromey <tromey@redhat.com>
7615
7616 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7617 Include print-utils.h.
7618 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7619 (plongest, thirty_two, phex_nz): Remove.
7620 * Makefile.in (SFILES): Add common/print-utils.c.
7621 (OBS): Add print-utils.o.
7622 (print-utils-ipa.o): New target.
7623 (print-utils.o): New target.
7624 (IPA_OBJS): Add print-utils-ipa.o.
7625
e99dc820
TT
76262014-02-06 Tom Tromey <tromey@redhat.com>
7627
7628 * Makefile.in (SFILES): Fix indentation.
7629
ee1e2d4f
DE
76302014-02-05 Doug Evans <dje@google.com>
7631
7632 * linux-low.c (linux_wait_for_event): Improve comment.
7633 (linux_wait_1): Keep current_inferior in sync with event_child.
7634
f5a02773
DE
76352014-01-22 Doug Evans <dje@google.com>
7636
7637 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7638
87ce2a04
DE
76392014-01-22 Doug Evans <dje@google.com>
7640
7641 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7642 * configure: Regenerate.
7643 * config.in: Regenerate.
7644 * Makefile.in (SFILES): Add debug.c.
7645 (OBS): Add debug.o.
7646 * debug.c: New file.
7647 * debug.h: New file.
7648 * linux-aarch64-low.c (*): Update all debugging printfs to use
7649 debug_printf instead of fprintf.
7650 * linux-arm-low.c (*): Ditto.
7651 * linux-cris-low.c (*): Ditto.
7652 * linux-crisv32-low.c (*): Ditto.
7653 * linux-m32r-low.c (*): Ditto.
7654 * linux-sparc-low.c (*): Ditto.
7655 * linux-x86.c (*): Ditto.
7656 * linux-low.c (*): Ditto.
7657 (linux_wait_1): Add calls to debug_enter, debug_exit.
7658 (linux_wait): Remove redundant debugging printf.
7659 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7660 (linux_resume, unstop_all_lwps): Ditto.
7661 * mem-break.c (*): Update all debugging printfs to use
7662 debug_printf instead of fprintf.
7663 * remote-utils.c (*): Ditto.
7664 * thread-db.c (*): Ditto.
7665 * server.c #include <ctype.h>, "gdb_vecs.h".
7666 (debug_threads): Moved to debug.c.
7667 (*): Update all debugging printfs to use debug_printf instead of
7668 fprintf.
7669 (start_inferior): Replace call to fflush with call to debug_flush.
7670 (monitor_show_help): Mention set debug-format.
7671 (parse_debug_format_options): New function.
7672 (handle_monitor_command): Handle "monitor set debug-format".
7673 (gdbserver_usage): Mention --debug-format.
7674 (main): Parse --debug-format.
7675 * server.h (debug_threads): Declaration moved to debug.h.
7676 #include "debug.h".
7677 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7678 trace_debug_1 that uses debug_printf.
7679 (tracepoint_look_up_symbols): Update all debugging printfs to use
7680 debug_printf instead of fprintf.
7681
e671835b
BS
76822014-01-20 Baruch Siach <baruch@tkos.co.il>
7683
7684 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7685 sys/ptrace.h.
7686
b5737fa9
PA
76872014-01-17 Pedro Alves <palves@redhat.com>
7688
ea38d2a9 7689 PR build/16445
c7faa97a
PA
7690 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7691 defined after including gdb_proc_service.h.
b5737fa9 7692
40ed484e
DE
76932014-01-16 Doug Evans <dje@google.com>
7694
7695 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7696 (match_dll): Use it.
7697
969c39fb
MM
76982014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7699
7700 * target.h (target_ops) <read_btrace>: Change parameters and
7701 return type to allow error reporting.
7702 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7703 trace reading errors on.
7704 * linux-low.c (linux_low_read_btrace): Pass trace reading
7705 errors on.
7706 (linux_low_disable_btrace): New.
7707
ab7f45ba
DE
77082014-01-15 Doug Evans <dje@google.com>
7709
7710 * inferiors.c (thread_id_to_gdb_id): Delete.
7711 * inferiors.h (thread_id_to_gdb_id): Delete.
7712
66af0f44
EZ
77132014-01-13 Eli Zaretskii <eliz@gnu.org>
7714
7715 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7716 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7717 versions.
7718
9939e131
PA
77192014-01-08 Pedro Alves <palves@redhat.com>
7720
7721 * server.c (handle_status): Don't discard previous queued stop
7722 replies or thread's pending status here.
7723 (main) <disconnection>: Do it here instead.
7724
b7ea362b
PA
77252014-01-08 Pedro Alves <palves@redhat.com>
7726
7727 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7728 * server.c (visit_actioned_threads, handle_pending_status): New
7729 function.
7730 (handle_v_cont): Factor out parts to ...
7731 (resume): ... this new function. If in all-stop, and a thread
7732 being resumed has a pending status, report it without actually
7733 resuming.
7734 (myresume): Adjust to use the new 'resume' function.
7735 (clear_pending_status_callback, set_pending_status_callback)
7736 (find_status_pending_thread_callback): New functions.
7737 (handle_status): Handle the case of multiple threads having
7738 interesting statuses to report. Report threads' real last signal
7739 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7740 with an interesting thread to report the status for, instead of
7741 always reporting the status of the first thread.
7742
28498c42
JB
77432014-01-01 Joel Brobecker <brobecker@adacore.com>
7744
7745 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7746 * gdbreplay.c (gdbreplay_version): Likewise.
7747
f45c82da
YZ
77482013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7749
7750 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7751 iov.iov_len with the real length in use.
7752
379a5e2d
JB
77532013-12-13 Joel Brobecker <brobecker@adacore.com>
7754
7755 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7756 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7757 for all targets that use win32-low.c.
7758 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7759 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7760
4210d83e
PA
77612013-12-13 Pedro Alves <palves@redhat.com>
7762
7763 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7764 if equal to TARGET_WAITKIND_LOADED.
7765 * win32-low.c (cached_status): New static global.
7766 (win32_wait): Add declaration.
7767 (do_initial_child_stuff): Flush all initial pending debug events
7768 up to the initial breakpoint.
7769 (win32_wait): If CACHED_STATUS was set, return that instead
7770 of doing a real wait. Remove the code resuming the execution
7771 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7772 during the initial phase. Also remove the code changing
7773 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7774 TARGET_WAITKIND_STOPPED.
7775
e7f0d979
YQ
77762013-12-11 Yao Qi <yao@codesourcery.com>
7777
7778 * notif.c (handle_notif_ack): Return 0 if no notification
7779 matches.
7780
ebcf782c
DE
77812013-11-20 Doug Evans <dje@google.com>
7782
7783 * linux-low.c (linux_set_resume_request): Fix comment.
7784
20ad9378
DE
77852013-11-20 Doug Evans <dje@google.com>
7786
7787 * linux-low.c (resume_status_pending_p): Tweak comment.
7788
a196ebeb
WT
77892013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7790
7791 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7792 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7793 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7794 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7795 (srv_amd64_regobj): Add amd64-mpx.o.
7796 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7797 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7798 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7799 * i387-fp.c (num_pl_bnd_register) Added constant.
7800 (num_pl_bnd_cfg_registers) Added constant.
7801 (struct i387_xsave) Added reserved area and MPX fields.
7802 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7803 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7804 function.
7805 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7806 (init_registers_amd64_mpx_linux): Declare new function.
7807 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7808 (x86_64_regmap): Add MPX registers.
7809 (x86_linux_read_description): Add MPX case.
7810 (initialize_low_arch): Initialize MPX targets.
7811
0080a2f6
TT
78122013-11-18 Tom Tromey <tromey@redhat.com>
7813
7814 * configure: Rebuild.
7815 * configure.ac: Don't check for stdlib.h.
7816 * gdbreplay.c: Unconditionally include stdlib.h.
7817
2978b111
TT
78182013-11-18 Tom Tromey <tromey@redhat.com>
7819
7820 * config.in: Rebuild.
7821 * configure: Rebuild.
7822 * configure.ac: Don't use AC_HEADER_DIRENT.
7823
a3d08894
TT
78242013-11-18 Tom Tromey <tromey@redhat.com>
7825
7826 * server.h: Don't check HAVE_STRING_H.
7827 * gdbreplay.c: Don't check HAVE_STRING_H.
7828 * configure: Rebuild.
7829
0a5dd17d
TT
78302013-11-18 Tom Tromey <tromey@redhat.com>
7831
7832 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7833 LIBGNU.
7834
1bd2f0ba
TT
78352013-11-08 Tom Tromey <tromey@redhat.com>
7836
7837 * configure, config.in: Rebuild.
7838 * configure.ac: Remove unused configury.
7839
3266f10b
TT
78402013-11-08 Tom Tromey <tromey@redhat.com>
7841
7842 * acinclude.m4: Include common.m4, codeset.m4.
7843 * configure, config.in: Rebuild.
7844 * configure.ac: Use GDB_AC_COMMON.
7845
6682d959
AA
78462013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7847
7848 * linux-s390-low.c (HWCAP_S390_TE): New define.
7849 (s390_arch_setup): Consider the TE field in the HWCAP for
7850 determining 'have_regset_tdb'.
7851
fd0a4d76
SDJ
78522013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7853
7854 PR gdb/16014
7855 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7856 call to sizeof.
7857
1a3d890b
PA
78582013-10-02 Pedro Alves <palves@redhat.com>
7859
7860 * server.c (process_serial_event): Don't output "GDBserver
7861 exiting" if GDB is connected through stdio.
7862 * target.c (mywait): Likewise, be silent if GDB is connected
7863 through stdio.
7864
97ad4581
JB
78652013-10-01 Joel Brobecker <brobecker@adacore.com>
7866
7867 * lynx-low.c (lynx_add_threads_after_attach): New function.
7868 (lynx_attach): Remove call to add_thread. Add call to
7869 lynx_add_threads_after_attach instead.
7870
5b4e221c
MF
78712013-09-28 Mike Frysinger <vapier@gentoo.org>
7872
7873 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7874 * config.in, configure: Regenerated.
7875
ee47b2f8
YQ
78762013-09-18 Yao Qi <yao@codesourcery.com>
7877
7878 PR server/15959
7879 * server.c (start_inferior): Clear 'resume_info'.
7880
d6707650 78812013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7882
d6707650
JW
7883 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7884 for each register.
7885
9243dd0e 78862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7887
9243dd0e
JW
7888 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7889 linux-tile-low.o to srv_tgtobj.
7890
c623a6ef
WN
78912013-09-16 Will Newton <will.newton@linaro.org>
7892
7893 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7894 out regs.
7895
fb71d39e
PA
78962013-09-06 Pedro Alves <palves@redhat.com>
7897
7898 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7899 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7900 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7901 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7902 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7903 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7904
8e7e9910
PA
79052013-09-06 Pedro Alves <palves@redhat.com>
7906
7907 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7908 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7909
7c3a12ca
PA
79102013-09-06 Pedro Alves <palves@redhat.com>
7911
7912 * linux-amd64-ipa.c: Include tracepoint.h.
7913 * linux-i386-ipa.c: Include tracepoint.h.
7914
8eb3d7b6
RW
79152013-09-06 Ricard Wanderlof <ricardw@axis.com>
7916
7917 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7918 (ps_get_thread_area): New function.
7919
eddddb9d
RW
79202013-09-06 Ricard Wanderlof <ricardw@axis.com>
7921
7922 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7923 (initialize_low_arch): Call init_registers_crisv32 rather than
7924 init_register_crisv32.
7925
533b0600
PA
79262013-09-05 Pedro Alves <palves@redhat.com>
7927
7928 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7929 to ...
7930 * hostio.h: ... this new file.
7931 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7932 win32-low.c: Include hostio.h.
7933
0ce3d3b5
PA
79342013-09-05 Pedro Alves <palves@redhat.com>
7935
7936 * server.h (gdb_client_data, handler_func, callback_handler_func)
7937 (delete_file_handler, add_file_handler, append_callback_event)
7938 (delete_callback_event, start_event_loop, initialize_event_loop):
7939 Move to event-loop.h and include it.
7940 * event-loop.h: New file.
7941
799cdc37
PA
79422013-09-05 Pedro Alves <palves@redhat.com>
7943
7944 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7945 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7946 (loaded_dll, unloaded_dll): Move to ...
7947 * dll.h: ... this new file.
7948 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7949
6a6bbd9d
PA
79502013-09-05 Pedro Alves <palves@redhat.com>
7951
7952 * server.h (current_process, get_thread_process, all_processes)
7953 (add_inferior_to_list, for_each_inferior, current_inferior)
7954 (remove_inferior, add_process, remove_process, find_process_pid)
7955 (have_started_inferiors_p, have_attached_inferiors_p)
7956 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7957 (clear_inferiors, find_inferior, find_inferior_id)
7958 (inferior_target_data, set_inferior_target_data)
7959 (inferior_regcache_data, set_inferior_regcache_data): Move to
7960 inferiors.h, and include it.
7961 * inferiors.h: New file.
7962
f699aaba
PA
79632013-09-05 Pedro Alves <palves@redhat.com>
7964
7965 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7966 Move ...
72f4393d 7967 * ax.h: ... here.
f699aaba 7968
c144c7a0
PA
79692013-09-05 Pedro Alves <palves@redhat.com>
7970
7971 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7972 tracepoint.h.
7973 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7974 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7975 (handle_tracepoint_general_set, handle_tracepoint_query)
7976 (tracepoint_finished_step, tracepoint_was_hit)
7977 (release_while_stepping_state_list, current_traceframe)
7978 (in_readonly_region, traceframe_read_mem)
7979 (fetch_traceframe_registers, traceframe_read_sdata)
7980 (traceframe_read_info, struct fast_tpoint_collect_status)
7981 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7982 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7983 (supply_fast_tracepoint_registers)
7984 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7985 (ipa_tdesc, claim_trampoline_space)
7986 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7987 (agent_mem_read, agent_get_trace_state_variable_value)
7988 (agent_set_trace_state_variable_value, agent_tsv_read)
7989 (agent_mem_read_string, get_raw_reg_func_addr)
7990 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7991 * tracepoint.h: ... this new file.
7992
ff42e6ab
PA
79932013-09-05 Pedro Alves <palves@redhat.com>
7994
7995 * server.h (perror_with_name, error, fatal, warning, paddress)
7996 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7997 include it.
7998 * utils.h: New file.
7999
541af0f4
PA
80002013-09-05 Pedro Alves <palves@redhat.com>
8001
8002 * server.h (remote_debug, noack_mode, transport_is_reliable)
8003 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8004 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8005 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8006 (write_enn, initialize_async_io, enable_async_io)
8007 (disable_async_io, check_remote_input_interrupt_request)
8008 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8009 (dead_thread_notify, prepare_resume_reply)
8010 (decode_address_to_semicolon, decode_address, decode_m_packet)
8011 (decode_M_packet, decode_X_packet, decode_xfer_write)
8012 (decode_search_memory_packet, unhexify, hexify)
8013 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8014 (look_up_one_symbol, relocate_instruction)
8015 (monitor_output): Move to remote-utils.h, and include it.
8016 * remote-utils.h: New file.
8017
eebdf26b
PA
80182013-09-05 Pedro Alves <palves@redhat.com>
8019
8020 * server.h (_): Delete.
8021
3aafd2ff
PA
80222013-09-02 Pedro Alves <palves@redhat.com>
8023
8024 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8025 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8026 allocated.
8027 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8028
cee83bcb
PM
80292013-09-02 Pierre Muller <muller@sourceware.org>
8030
8031 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8032 or WriteProcessMemory complete successfully and handle
8033 ERROR_PARTIAL_COPY error.
8034
9a13b2fa
PA
80352013-09-02 Pedro Alves <palves@redhat.com>
8036
8037 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8038 error instead of EIO.
8039
602e3198
JK
80402013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8041
8042 PR server/15604
8043 * linux-low.c: Include filestuff.h.
8044 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8045 * lynx-low.c: Include filestuff.h.
8046 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8047 * server.c: Include filestuff.h.
8048 (main): Call notice_open_fds.
8049 * spu-low.c: Include filestuff.h.
8050 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8051
96d7229d
LM
80522013-08-22 Luis Machado <lgustavo@codesourcery.com>
8053
8054 * Makefile.in: Explain why ../target and ../nat are not
8055 listed as include file search paths.
8056 (linux-waitpid.o): New object file rule.
8057 * configure.srv (srv_native_linux_obj): New variable.
8058 Replace all occurrences of linux native object files with
8059 $srv_native_linux_obj.
8060 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8061 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8062 (linux_enable_event_reporting): Remove declaration.
8063 (my_waitpid): Moved to common/linux-waitpid.c.
8064 (linux_wait_for_event): Pass ptid when calling
8065 linux_enable_event_reporting.
8066 (linux_supports_tracefork_flag): Remove.
8067 (linux_enable_event_reporting): Likewise.
8068 (linux_tracefork_grandchild): Remove.
8069 (STACK_SIZE): Moved to common/linux-ptrace.c.
8070 (linux_tracefork_child): Remove.
8071 (linux_test_for_tracefork): Remove.
8072 (linux_look_up_symbols): Call linux_supports_traceclone.
8073 (initialize_low): Remove call to linux_test_for_tracefork.
8074 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8075 common/linux-ptrace.h.
8076 (PTRACE_TYPE_ARG4): Likewise.
8077 Include linux-ptrace.h.
8078
32940073
PA
80792013-08-21 Pedro Alves <palves@redhat.com>
8080
8081 * config.in: Renegerate.
8082
33b60d58 80832013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8084
33b60d58
LM
8085 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8086 (SFILES): Remove $(srcdir)/common/target-common.c and
8087 add $(srcdir)/target/waitstatus.c.
8088 (OBS): Remove target-common.o and add waitstatus.o.
8089 (server_h): Remove $(srcdir)/../common/target-common.h and
8090 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8091 and $(srcdir)/../target/waitstatus.h.
8092 (target-common.o): Remove.
8093 (waitstatus.o): New target object file.
8094 * target.h: Do not include target-common.h and
8095 include target/resume.h, target/wait.h and
8096 target/waitstatus.h.
8097
b8e1b30e
LM
80982013-08-13 Luis Machado <lgustavo@codesourcery.com>
8099
8100 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8101 to PTRACE_TYPE_ARG3.
8102 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8103 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8104 PTRACE_TYPE_ARG4.
8105 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8106 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8107
7a60ad40
YQ
81082013-07-27 Jie Zhang <jie@codesourcery.com>
8109 Daniel Jacobowitz <dan@codesourcery.com>
8110 Yao Qi <yao@codesourcery.com>
8111
8112 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8113 (mips-linux-watch.o): New rule.
8114 (mips_linux_watch_h): New variable.
8115 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8116 srv_tgtobj.
8117 * linux-mips-low.c: Include mips-linux-watch.h.
8118 (struct arch_process_info, struct arch_lwp_info): New.
8119 (update_watch_registers_callback): New function.
8120 (mips_linux_new_process, mips_linux_new_thread) New functions.
8121 (mips_linux_prepare_to_resume, mips_insert_point): New
8122 functions.
8123 (mips_remove_point, mips_stopped_by_watchpoint): New
8124 functions.
8125 (rsp_bp_type_to_target_hw_bp_type): New function.
8126 (mips_stopped_data_address): New function.
8127 (the_low_target): Add watchpoint support functions.
8128
de6f69ad
YQ
81292013-07-27 Yao Qi <yao@codesourcery.com>
8130
8131 * i386-low.c: Include break-common.h.
8132 (enum target_hw_bp_type): Remove.
8133
3360c0bf
LM
81342013-07-24 Luis Machado <lgustavo@codesourcery.com>
8135
8136 * Makefile.in (SFILES): /common/target-common.c.
8137 (OBS): Add target-common.o.
8138 (server_h): Add $(srcdir)/../common/target-common.h.
8139 (target-common.o): New target.
8140 * server.c (queue_stop_reply_callback): Free
8141 status string after use.
8142 * target.c (target_waitstatus_to_string): Remove.
8143 * target.h: Include target-common.h.
8144 (resume_kind): Likewise.
8145 (target_waitkind): Likewise.
8146 (target_waitstatus): Likewise.
8147 (TARGET_WNOHANG): Likewise.
8148
bd885420
YQ
81492013-07-04 Yao Qi <yao@codesourcery.com>
8150
8151 * Makefile.in (host_alias): Use @host_noncanonical@.
8152 (target_alias): Use @target_noncanonical@.
8153 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8154 ACX_NONCANONICAL_HOST.
8155 * configure: Regenerated.
8156
8157 Revert:
8158 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8159
8160 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8161 * configure: Rebuild.
8162 * Makefile.in (version_host, version_target): Get from configure.
8163 (version.c): Use $(version_host) and $(version_target).
8164
17ef446e
PA
81652013-07-03 Pedro Alves <palves@redhat.com>
8166
8167 * Makefile.in (config.status): Depend on development.sh.
8168 * acinclude.m4: Include libmcheck.m4.
8169 * configure: Regenerate.
8170
7a9a7487
MG
81712013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8172
8173 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8174 attribute inside the parentheses.
8175 (winapi_DebugSetProcessKillOnExit): Ditto.
8176 (winapi_DebugBreakProcess): Ditto.
8177 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8178
49b64de6
MG
81792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8180
8181 * notif.h (notif_event): Add a dummy member to avoid compiler
8182 errors.
8183
d5749ee7
PA
81842013-07-01 Pedro Alves <palves@redhat.com>
8185
8186 * hostio.c (HOSTIO_PATH_MAX): Define.
8187 (require_filename, handle_open, handle_unlink, handle_readlink):
8188 Use it.
8189
d8d2a3ee
PA
81902013-07-01 Pedro Alves <palves@redhat.com>
8191
8192 * server.h: Include "pathmax.h".
8193 * linux-low.c: Don't include sys/param.h.
8194 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8195 MAXPATHLEN.
8196 * win32-low.c: Don't include sys/param.h.
8197 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8198
bc7dea8d
PA
81992013-07-01 Pedro Alves <palves@redhat.com>
8200
8201 * event-loop.c: Don't check HAVE_UNISTD_H before including
8202 <unistd.h>.
8203 * gdbreplay.c: Likewise.
8204 * remote-utils.c: Likewise.
8205 * server.c: Likewise.
8206 * configure.ac: Don't check for unistd.h.
8207 * configure: Regenerate.
8208
d6c2da54
TT
82092013-06-28 Tom Tromey <tromey@redhat.com>
8210
8211 * Makefile.in (version.c): Use version.in, not
8212 common/version.in.
8213
257b6bec
MG
82142013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8215
8216 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8217 * configure: Rebuild.
8218 * Makefile.in (version_host, version_target): Get from configure.
8219 (version.c): Use $(version_host) and $(version_target).
8220
86ebe149
DK
82212013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8222
8223 Fix trace-status to output user name without trailing colon.
8224 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8225
f30aa5af
DK
82262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8227
8228 Fix trace-status to output proper start-time and stop-time.
8229 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8230 output start time and stop time in hex as gdb expects.
8231
28a93511
YQ
82322013-06-26 Pedro Alves <pedro@codesourcery.com>
8233
8234 * tracepoint.c (build_traceframe_info_xml): Output trace state
8235 variables present in the trace buffer.
8236
01208463
TT
82372013-06-24 Tom Tromey <tromey@redhat.com>
8238
8239 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8240 create-version.sh.
8241 (version.o): Remove.
8242 * gdbreplay.c: Include version.h.
8243 (version, host_name): Don't declare.
8244 * server.h: Include version.h.
8245 (version, host_name): Don't declare.
8246
760256f9
PA
82472013-06-12 Pedro Alves <palves@redhat.com>
8248
8249 * linux-x86-low.c (linux_is_elf64): Delete global.
8250 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8251 with local linux_pid_exe_is_elf_64_file use.
8252
030031ee
PA
82532013-06-11 Pedro Alves <palves@redhat.com>
8254
8255 * linux-low.c (regset_disabled, disable_regset): New functions.
8256 (regsets_fetch_inferior_registers)
8257 (regsets_store_inferior_registers): Use them.
8258 (initialize_regsets_info); Don't allocate the disabled_regsets
8259 array here.
8260 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8261 comment.
8262
5da6eb0a
PA
82632013-06-11 Pedro Alves <palves@redhat.com>
8264
8265 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8266 xmalloc.
8267
7e5aaa09
PA
82682013-06-11 Pedro Alves <palves@redhat.com>
8269
8270 * linux-x86-low.c (initialize_low_arch): Call
8271 init_registers_x32_avx_linux.
8272
d878444c
JK
82732013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8274
8275 Fix compatibility with Android Bionic.
8276 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8277 it is not empty.
8278
3aee8918
PA
82792013-06-07 Pedro Alves <palves@redhat.com>
8280
5f2b57b5 8281 PR server/14823
3aee8918
PA
8282 * Makefile.in (OBS): Add tdesc.o.
8283 (IPA_OBJS): Add tdesc-ipa.o.
8284 (tdesc-ipa.o): New rule.
8285 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8286 interface.
8287 * linux-low.c (new_inferior): Delete.
8288 (disabled_regsets, num_regsets): Delete.
8289 (linux_add_process): Adjust to set the new per-process
8290 new_inferior flag.
8291 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8292 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8293 was a stop. When calling arch_setup, switch the current inferior
8294 to the thread that got an event.
8295 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8296 (regsets_fetch_inferior_registers)
8297 (regsets_store_inferior_registers): New regsets_info parameter.
8298 Adjust to use it.
8299 (linux_register_in_regsets): New regs_info parameter. Adjust to
8300 use it.
8301 (register_addr, fetch_register, store_register): New usrregs_info
8302 parameter. Adjust to use it.
8303 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8304 parameter regs_info. Adjust to use it.
8305 (linux_fetch_registers): Get the current inferior's regs_info, and
8306 adjust to use it.
8307 (linux_store_registers): Ditto.
8308 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8309 (initialize_low): Don't initialize the target_regsets here. Call
8310 initialize_low_arch.
8311 * linux-low.h (target_regsets): Delete declaration.
8312 (struct regsets_info): New.
8313 (struct usrregs_info): New.
8314 (struct regs_info): New.
8315 (struct process_info_private) <new_inferior>: New field.
8316 (struct linux_target_ops): Delete the num_regs, regmap, and
8317 regset_bitmap fields. New field regs_info.
8318 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8319 * i387-fp.c (num_xmm_registers): Delete.
8320 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8321 calls to new interface.
8322 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8323 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8324 Infer the number of xmm registers from the regcache's target
8325 description.
8326 * i387-fp.h (num_xmm_registers): Delete.
8327 * inferiors.c (add_thread): Don't install the thread's regcache
8328 here.
8329 * proc-service.c (gregset_info): Fetch the current inferior's
8330 regs_info. Adjust to use it.
8331 * regcache.c: Include tdesc.h.
8332 (register_bytes, reg_defs, num_registers)
8333 (gdbserver_expedite_regs): Delete.
8334 (get_thread_regcache): If the thread doesn't have a regcache yet,
8335 create one, instead of aborting gdbserver.
8336 (regcache_invalidate_one): Rename to ...
8337 (regcache_invalidate_thread): ... this.
8338 (regcache_invalidate_one): New.
8339 (regcache_invalidate): Only invalidate registers of the current
8340 process.
8341 (init_register_cache): Add target_desc parameter, and use it.
8342 (new_register_cache): Ditto. Assert the target description has a
8343 non zero registers_size.
8344 (regcache_cpy): Add assertions. Adjust.
8345 (realloc_register_cache, set_register_cache): Delete.
8346 (registers_to_string, registers_from_string): Adjust.
8347 (find_register_by_name, find_regno, find_register_by_number)
8348 (register_cache_size): Add target_desc parameter, and use it.
8349 (free_register_cache_thread, free_register_cache_thread_one)
8350 (regcache_release, register_cache_size): New.
8351 (register_size): Add target_desc parameter, and use it.
8352 (register_data, supply_register, supply_register_zeroed)
8353 (supply_regblock, supply_register_by_name, collect_register)
8354 (collect_register_as_string, collect_register_by_name): Adjust.
8355 * regcache.h (struct target_desc): Forward declare.
8356 (struct regcache) <tdesc>: New field.
8357 (init_register_cache, new_register_cache): Add target_desc
8358 parameter.
8359 (regcache_invalidate_thread): Declare.
8360 (regcache_invalidate_one): Delete declaration.
8361 (regcache_release): Declare.
8362 (find_register_by_number, register_cache_size, register_size)
8363 (find_regno): Add target_desc parameter.
8364 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8365 declarations.
8366 * remote-utils.c: Include tdesc.h.
8367 (outreg, prepare_resume_reply): Adjust.
8368 * server.c: Include tdesc.h.
8369 (gdbserver_xmltarget): Delete declaration.
8370 (get_features_xml, process_serial_event): Adjust.
8371 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8372 declare.
8373 (struct process_info) <tdesc>: New field.
8374 (ipa_tdesc): Declare.
8375 * tdesc.c: New file.
8376 * tdesc.h: New file.
8377 * tracepoint.c: Include tdesc.h.
8378 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8379 (get_context_regcache): Adjust to pass ipa_tdesc down.
8380 (do_action_at_tracepoint): Adjust to get the register cache size
8381 from the context regcache's description.
8382 (traceframe_walk_blocks): Adjust to get the register cache size
8383 from the current trace frame's description.
8384 (traceframe_get_pc): Adjust to get current trace frame's
8385 description and pass it down.
8386 (gdb_collect): Adjust to get the register cache size from the
8387 IPA's description.
8388 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8389 (gdbserver_xmltarget): Delete.
8390 (initialize_low_tracepoint): Set the ipa's target description.
8391 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8392 (initialize_low_tracepoint): Set the ipa's target description.
8393 * linux-x86-low.c: Include tdesc.h.
8394 [__x86_64__] (is_64bit_tdesc): New.
8395 (ps_get_thread_area, x86_get_thread_area): Use it.
8396 (i386_cannot_store_register): Rename to ...
8397 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8398 (i386_cannot_fetch_register): Rename to ...
8399 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8400 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8401 to new interface.
8402 (target_regsets): Rename to ...
8403 (x86_regsets): ... this.
8404 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8405 interface.
8406 (x86_siginfo_fixup): Use is_64bit_tdesc.
8407 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8408 (tdesc_x32_avx_linux, tdesc_x32_linux)
8409 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8410 Declare.
8411 (x86_linux_update_xmltarget): Delete.
8412 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8413 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8414 (AMD64_LINUX_USER64_CS): New.
8415 (x86_linux_read_description): New, based on
8416 x86_linux_update_xmltarget.
8417 (same_process_callback): New.
8418 (x86_arch_setup_process_callback): New.
8419 (x86_linux_update_xmltarget): New.
8420 (x86_regsets_info): New.
8421 (amd64_linux_regs_info): New.
8422 (i386_linux_usrregs_info): New.
8423 (i386_linux_regs_info): New.
8424 (x86_linux_regs_info): New.
8425 (x86_arch_setup): Reimplement.
8426 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8427 (x86_emit_ops): Ditto.
8428 (the_low_target): Adjust. Install x86_linux_regs_info,
8429 x86_cannot_fetch_register, and x86_cannot_store_register.
8430 (initialize_low_arch): New.
8431 * linux-ia64-low.c (tdesc_ia64): Declare.
8432 (ia64_fetch_register): Adjust.
8433 (ia64_usrregs_info, regs_info): New globals.
8434 (ia64_regs_info): New function.
8435 (the_low_target): Adjust.
8436 (initialize_low_arch): New function.
8437 * linux-sparc-low.c (tdesc_sparc64): Declare.
8438 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8439 Adjust.
8440 (sparc_arch_setup): New function.
8441 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8442 (the_low_target): Adjust.
8443 (initialize_low_arch): New function.
8444 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8445 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8446 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8447 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8448 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8449 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8450 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8451 (tdesc_powerpc_isa205_vsx64l): Declare.
8452 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8453 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8454 (ppc_set_pc, ppc_get_hwcap): Adjust.
8455 (ppc_usrregs_info): Forward declare.
8456 (!__powerpc64__) ppc_regmap_adjusted: New global.
8457 (ppc_arch_setup): Adjust to the current process'es target
8458 description.
8459 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8460 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8461 (ppc_store_evrregset): Adjust.
8462 (target_regsets): Rename to ...
8463 (ppc_regsets): ... this, and make static.
8464 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8465 (ppc_regs_info): New function.
8466 (the_low_target): Adjust.
8467 (initialize_low_arch): New function.
8468 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8469 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8470 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8471 (tdesc_s390x_linux64v2): Declare.
8472 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8473 (s390_fill_gregset, s390_store_last_break): Adjust.
8474 (target_regsets): Rename to ...
8475 (s390_regsets): ... this, and make static.
8476 (s390_get_pc, s390_set_pc): Adjust.
8477 (s390_get_hwcap): New target_desc parameter, and use it.
8478 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8479 (s390_arch_setup): Adjust to set the current process'es target
8480 description. Don't adjust the regmap.
8481 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8482 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8483 (regs_info_3264): New globals.
8484 (s390_regs_info): New function.
8485 (the_low_target): Adjust.
8486 (initialize_low_arch): New function.
8487 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8488 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8489 [__mips64] (init_registers_mips_linux)
8490 (init_registers_mips_dsp_linux): Delete defines.
8491 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8492 (have_dsp): New global.
8493 (mips_read_description): New, based on mips_arch_setup.
8494 (mips_arch_setup): Reimplement.
8495 (get_usrregs_info): New function.
8496 (mips_cannot_fetch_register, mips_cannot_store_register)
8497 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8498 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8499 (target_regsets): Rename to ...
8500 (mips_regsets): ... this, and make static.
8501 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8502 (dsp_regs_info, regs_info): New globals.
8503 (mips_regs_info): New function.
8504 (the_low_target): Adjust.
8505 (initialize_low_arch): New function.
8506 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8507 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8508 Declare.
8509 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8510 (arm_read_description): New, with bits factored from
8511 arm_arch_setup.
8512 (arm_arch_setup): Reimplement.
8513 (target_regsets): Rename to ...
8514 (arm_regsets): ... this, and make static.
8515 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8516 (arm_regs_info): New function.
8517 (the_low_target): Adjust.
8518 (initialize_low_arch): New function.
8519 * linux-m68k-low.c (tdesc_m68k): Declare.
8520 (target_regsets): Rename to ...
8521 (m68k_regsets): ... this, and make static.
8522 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8523 (m68k_regs_info): New function.
8524 (m68k_arch_setup): New function.
8525 (the_low_target): Adjust.
8526 (initialize_low_arch): New function.
8527 * linux-sh-low.c (tdesc_sharch): Declare.
8528 (target_regsets): Rename to ...
8529 (sh_regsets): ... this, and make static.
8530 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8531 (sh_regs_info, sh_arch_setup): New functions.
8532 (the_low_target): Adjust.
8533 (initialize_low_arch): New function.
8534 * linux-bfin-low.c (tdesc_bfin): Declare.
8535 (bfin_arch_setup): New function.
8536 (bfin_usrregs_info, regs_info): New globals.
8537 (bfin_regs_info): New function.
8538 (the_low_target): Adjust.
8539 (initialize_low_arch): New function.
8540 * linux-cris-low.c (tdesc_cris): Declare.
8541 (cris_arch_setup): New function.
8542 (cris_usrregs_info, regs_info): New globals.
8543 (cris_regs_info): New function.
8544 (the_low_target): Adjust.
8545 (initialize_low_arch): New function.
8546 * linux-cris-low.c (tdesc_crisv32): Declare.
8547 (cris_arch_setup): New function.
8548 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8549 (cris_regs_info): New function.
8550 (the_low_target): Adjust.
8551 (initialize_low_arch): New function.
8552 * linux-m32r-low.c (tdesc_m32r): Declare.
8553 (m32r_arch_setup): New function.
8554 (m32r_usrregs_info, regs_info): New globals.
8555 (m32r_regs_info): Adjust.
8556 (initialize_low_arch): New function.
8557 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8558 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8559 (tic6x_usrregs_info): Forward declare.
8560 (tic6x_read_description): New function, based on ...
8561 (tic6x_arch_setup): ... this. Reimplement.
8562 (target_regsets): Rename to ...
8563 (tic6x_regsets): ... this, and make static.
8564 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8565 (tic6x_regs_info): New function.
8566 (the_low_target): Adjust.
8567 (initialize_low_arch): New function.
8568 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8569 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8570 (target_regsets): Rename to ...
8571 (xtensa_regsets): ... this, and make static.
8572 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8573 globals.
8574 (xtensa_arch_setup, xtensa_regs_info): New functions.
8575 (the_low_target): Adjust.
8576 (initialize_low_arch): New function.
8577 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8578 (nios2_arch_setup): Set the current process'es tdesc.
8579 (target_regsets): Rename to ...
8580 (nios2_regsets): ... this.
8581 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8582 (nios2_regs_info): New function.
8583 (the_low_target): Adjust.
8584 (initialize_low_arch): New function.
a261b8f5
PA
8585 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8586 (aarch64_arch_setup): Set the current process'es tdesc.
8587 (target_regsets): Rename to ...
8588 (aarch64_regsets): ... this.
8589 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8590 (aarch64_regs_info): New function.
8591 (the_low_target): Adjust.
8592 (initialize_low_arch): New function.
3aee8918
PA
8593 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8594 globals.
8595 (target_regsets): Rename to ...
8596 (tile_regsets): ... this.
8597 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8598 (tile_regs_info): New function.
8599 (tile_arch_setup): Set the current process'es tdesc.
8600 (the_low_target): Adjust.
8601 (initialize_low_arch): New function.
8602 * spu-low.c (tdesc_spu): Declare.
8603 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8604 * win32-arm-low.c (tdesc_arm): Declare.
8605 (arm_arch_setup): New function.
8606 (the_low_target): Install arm_arch_setup instead of
8607 init_registers_arm.
8608 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8609 (init_windows_x86): Rename to ...
8610 (i386_arch_setup): ... this. Set `win32_tdesc'.
8611 (the_low_target): Adjust.
8612 * win32-low.c (win32_tdesc): New global.
8613 (child_add_thread): Don't create the thread cache here.
8614 (do_initial_child_stuff): Set the new process'es tdesc.
8615 * win32-low.h (struct target_desc): Forward declare.
8616 (win32_tdesc): Declare.
8617 * lynx-i386-low.c (tdesc_i386): Declare global.
8618 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8619 * lynx-low.c (lynx_tdesc): New global.
8620 (lynx_add_process): Set the new process'es tdesc.
8621 * lynx-low.h (struct target_desc): Forward declare.
8622 (lynx_tdesc): Declare global.
8623 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8624 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8625 * nto-low.c (nto_tdesc): New global.
8626 (do_attach): Set the new process'es tdesc.
8627 * nto-low.h (struct target_desc): Forward declare.
8628 (nto_tdesc): Declare.
8629 * nto-x86-low.c (tdesc_i386): Declare.
8630 (nto_x86_arch_setup): Set `nto_tdesc'.
8631
b1fbec62
GB
86322013-06-04 Gary Benson <gbenson@redhat.com>
8633
8634 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8635 to qSupported response when appropriate.
8636 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8637 with nonzero-length annex.
8638 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8639 arguments supplied in annex.
8640
d1ec4ce7
DE
86412013-05-31 Doug Evans <dje@google.com>
8642
ac44adcb 8643 PR server/15594
d1ec4ce7
DE
8644 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8645 64 bits in 64-cross-32 environment.
8646
9b25f2d3
PA
86472013-05-28 Pedro Alves <palves@redhat.com>
8648
8649 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8650 (aarch64-without-fpu.c): Delete rule.
8651 * configure.srv (aarch64*-*-linux*): Remove references to
8652 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8653 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8654 declaration.
8655
6740dc9c
PA
86562013-05-24 Pedro Alves <palves@redhat.com>
8657
8658 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8659 instead of strchr/decode_address. Error if the range isn't split
8660 with a ','. Don't assume there's be a ':' in the action.
8661
c2d6af84
PA
86622013-05-23 Yao Qi <yao@codesourcery.com>
8663 Pedro Alves <palves@redhat.com>
8664
8665 * linux-low.c (lwp_in_step_range): New function.
8666 (linux_wait_1): If the thread was range stepping and stopped
8667 outside the stepping range, report the stop to GDB. Otherwise,
8668 continue stepping. Add range stepping debug output.
8669 (linux_set_resume_request): Copy the step range from the resume
8670 request to the lwp.
8671 (linux_supports_range_stepping): New.
8672 (linux_target_ops) <supports_range_stepping>: Set to
8673 linux_supports_range_stepping.
8674 * linux-low.h (struct linux_target_ops)
8675 <supports_range_stepping>: New field.
8676 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8677 * linux-x86-low.c (x86_supports_range_stepping): New.
8678 (the_low_target) <supports_range_stepping>: Set to
8679 x86_supports_range_stepping.
8680 * server.c (handle_v_cont): Handle 'r' action.
8681 (handle_v_requests): Append ";r" if the target supports range
8682 stepping.
8683 * target.h (struct thread_resume) <step_range_start,
8684 step_range_end>: New fields.
8685 (struct target_ops) <supports_range_stepping>:
8686 New field.
8687 (target_supports_range_stepping): New macro.
8688
58794e1a
JB
86892013-05-17 Joel Brobecker <brobecker@adacore.com>
8690
8691 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8692 confusion in comment.
8693
d631c5a7
JB
86942013-05-17 Joel Brobecker <brobecker@adacore.com>
8695
8696 * lynx-low.c (struct process_info_private): New type.
8697 (lynx_add_process): New function.
8698 (lynx_create_inferior, lynx_attach): Replace calls to
8699 add_process by calls to lynx_add_process.
8700 (lynx_resume): If PTID is null, then try using
8701 current_process()->private->last_wait_event_ptid.
8702 Add comments.
8703 (lynx_clear_inferiors): Delete. The contents of that function
8704 has been inlined in lynx_mourn;
8705 (lynx_wait_1): Save the ptid in the process's private data.
8706 (lynx_mourn): Free the process' private data. Replace call
8707 to lynx_clear_inferiors by call to clear_inferiors.
8708
96f7a20f
YQ
87092013-05-17 Yao Qi <yao@codesourcery.com>
8710
8711 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8712 the right place.
8713
db0dfaa0
LM
87142013-05-16 Luis Machado <lgustavo@codesourcery.com>
8715
8716 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8717 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8718 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8719 PT_TEXT_END_ADDR guards. Update comments.
8720 (linux_target_op) <read_offsets>: Conditionally define to
8721 linux_read_offsets if the target is UCLIBC and if it defines
8722 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8723
68f5f838
SL
87242013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8725 Andrew Jenner <andrew@codesourcery.com>
8726
8727 * Makefile.in (SFILES): Add linux-nios2-low.c.
8728 (clean): Add action to delete nios2-linux.c.
8729 (nios2-linux.c): New rule.
8730 * configure.srv: Add nios2*-*-linux*.
8731 * linux-nios2-low.c: New.
8732
1ebff1fd
HAQ
87332013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8734
8735 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8736
f6150862
HZ
87372013-04-25 Hui Zhu <hui@codesourcery.com>
8738
8739 PR gdb/15186
f6150862
HZ
8740 * ax.c (ax_printf): Add fflush.
8741
614c279d
TT
87422013-04-22 Tom Tromey <tromey@redhat.com>
8743
8744 * Makefile.in (SFILES): Add filestuff.c.
8745 (OBS): Add filestuff.o.
8746 (filestuff.o): New target.
8747 * config.in, configure: Rebuild.
8748 * configure.ac: Check for fdwalk, pipe2.
8749
7d4e5717
PA
87502013-04-17 Pedro Alves <palves@redhat.com>
8751
8752 * configure.ac (USE_THREAD_DB): Delete variable.
8753 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8754 Don't AC_SUBST USE_THREAD_DB.
8755 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8756 * config.in, configure: Regenerate.
8757
d5c93e41
PA
87582013-04-16 Pedro Alves <palves@redhat.com>
8759
8760 * linux-low.h (struct lwp_info) <thread_known>: Move under
8761 the USE_THREAD_DB #ifdef.
8762
04f5fe89
PA
87632013-04-16 Pedro Alves <palves@redhat.com>
8764
8765 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8766 (linux-low.o): Delete rule.
8767 * linux-low.h: Always include "gdb_thread_db.h" instead of
8768 conditionally including thread_db.h.
8769 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8770 HAVE_THREAD_DB_H.
8771
480b27bf
JK
87722013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8773
8774 * Makefile.in (install-only): Fix make install regression.
8775
43662968
JK
87762013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8777
8778 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8779 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8780 installation.
8781 * gdbserver.1: Remove.
8782
3e74e146
PA
87832013-03-22 Pedro Alves <palves@redhat.com>
8784
8785 * linux-low.c (handle_extended_wait): Don't call
8786 linux_enable_event_reporting.
8787
a8347a2a
TT
87882013-03-15 Tony Theodore <tonyt@logyst.com>
8789
8790 PR build/9098:
8791 * Makefile.in (SHELL): Use @SHELL@.
8792
eeb56fa7
SDJ
87932013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8794
8795 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8796 compiler warning.
8797
4fa7e2ff
JB
87982013-03-13 Joel Brobecker <brobecker@adacore.com>
8799
8800 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8801 Remove extraneous NULL element.
8802
8ddb1965
YQ
88032013-03-13 Yao Qi <yao@codesourcery.com>
8804
8805 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8806 'V' block in trace frame.
8807
9accd112
MM
88082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8809
8810 * target.h (struct target_ops): Add btrace ops.
8811 (target_supports_btrace): New macro.
8812 (target_enable_btrace): New macro.
8813 (target_disable_btrace): New macro.
8814 (target_read_btrace): New macro.
8815 * gdbthread.h (struct thread_info): Add btrace field.
8816 * server.c: Include btrace-common.h.
8817 (handle_btrace_general_set): New function.
8818 (handle_btrace_enable): New function.
8819 (handle_btrace_disable): New function.
8820 (handle_general_set): Call handle_btrace_general_set.
8821 (handle_qxfer_btrace): New function.
8822 (struct qxfer qxfer_packets[]): Add btrace entry.
8823 * inferiors.c (remove_thread): Disable btrace.
8824 * linux-low: Include linux-btrace.h.
8825 (linux_low_enable_btrace): New function.
8826 (linux_low_read_btrace): New function.
8827 (linux_target_ops): Add btrace ops.
8828 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8829 Add srv_linux_btrace=yes.
8830 (x86_64-*-linux*): Add linux-btrace.o.
8831 Add srv_linux_btrace=yes.
8832 * configure.ac: Define HAVE_LINUX_BTRACE.
8833 * config.in: Regenerated.
8834 * configure: Regenerated.
8835
5cc22e4c
MM
88362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8837
8838 * server.c (handle_qxfer): Preserve error message if -3 is
8839 returned.
8840 (qxfer): Document the -3 return value.
8841
7c97f91e
MM
88422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8843
8844 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8845 (linux_btrace_h): New variable.
8846 (linux-btrace.o): New rule.
8847
be9a119c 88482013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8849 Hafiz Abid Qadeer <abidh@codesourcery.com>
8850
8851 * tracepoint.c (trace_buffer_size): New global.
8852 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8853 (init_trace_buffer): Change to one-argument function. Allocate
8854 trace buffer memory.
8855 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8856 handle QTBuffer:size packet.
8857 (cmd_bigqtbuffer_size): New function.
8858 (initialize_tracepoint): Call init_trace_buffer with
8859 DEFAULT_TRACE_BUFFER_SIZE.
8860 * server.c (handle_query): Add QTBuffer:size in the
8861 supported packets.
8862
e64f7499
YQ
88632013-03-07 Yao Qi <yao@codesourcery.com>
8864
8865 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8866 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8867 of -1.
8868 (cmd_qtsp): Adjust condition. Do post increment.
8869 Set cur_action and cur_step_action back to 0.
8870
f0ae6fc3
PA
88712013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8872
8873 PR server/15236
8874 * linux-low.c (linux_write_memory): Return early success if LEN is
8875 zero.
8876
b5b0b0af
CV
88772013-03-05 Corinna Vinschen <vinschen@redhat.de>
8878
334ad4a8 8879 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8880
589bc927
TT
88812013-02-28 Tom Tromey <tromey@redhat.com>
8882
8883 * configure.ac: Invoke AC_SYS_LARGEFILE.
8884 * configure, config.in: Rebuild.
8885
dfe07582
CV
88862013-02-28 Corinna Vinschen <vinschen@redhat.com>
8887
8888 * win32-low.c: Throughout, fix format strings and casts of
8889 printf-like functions to avoid type related warnings on all
8890 platforms.
8891 (get_child_debug_event): Print dwDebugEventCode as hex since
8892 that's how it's usually documented.
8893
736cd585
YQ
88942013-02-28 Yao Qi <yao@codesourcery.com>
8895
8896 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8897 pulongest.
8898
e1f58301
JW
88992013-02-27 Jiong Wang <jiwang@tilera.com>
8900
8901 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8902 (reg-tilegx32.c): New rule.
8903 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8904 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8905 different register info initializer according to elf class.
8906 (init_registers_tilgx32): New function. The tilegx32 register info
8907 initializer.
8908 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8909 (tile_store_gregset): Likewise.
8910
d171ca78
YQ
89112013-02-27 Yao Qi <yao@codesourcery.com>
8912
8913 * server.c (process_point_options): Print debug message when
8914 debug_threads is true.
8915
282bbdf3
YQ
89162013-02-26 Yao Qi <yao@codesourcery.com>
8917
8918 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8919
aca22551
PA
89202013-02-19 Pedro Alves <palves@redhat.com>
8921 Kai Tietz <ktietz@redhat.com>
8922
8923 PR gdb/15161
8924
8925 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8926 instead of strtoul to extract address from packet.
8927 (process_serial_event) <'z'>: Likewise.
8928
4f3cee1c
YQ
89292013-02-18 Yao Qi <yao@codesourcery.com>
8930
8931 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8932
8e1d55a3
PA
89332013-02-14 Pedro Alves <palves@redhat.com>
8934
8935 Plug memory leak.
8936
8937 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8938 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8939
458820da
PA
89402013-02-14 Pedro Alves <palves@redhat.com>
8941
8942 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8943
baea0dae
PA
89442013-02-14 Pedro Alves <palves@redhat.com>
8945
8946 * tracepoint.c (save_string): Delete.
8947 (add_tracepoint_action): Use savestring instead of save_string.
8948
0b1afbb3
PA
89492013-02-12 Pedro Alves <palves@redhat.com>
8950
8951 * linux-xtensa-low.c: Ditto.
8952 * xtensa-xtregs.c: Ditto.
8953
8a4ac37e
PA
89542013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8955
8956 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8957 thread_db.
8958
148de6bb
MS
89592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8960
8961 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8962 aarch64_num_wp_regs and aarch64_num_bp_regs to
8963 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8964
55fac6e0
MS
89652013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8966
8967 * linux-aarch64-low.c (ps_get_thread_area): Replace
8968 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8969
176eb98c
MS
89702013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8971 Marcus Shawcroft <marcus.shawcroft@arm.com>
8972 Nigel Stephens <nigel.stephens@arm.com>
8973 Yufeng Zhang <yufeng.zhang@arm.com>
8974
8975 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8976 (aarch64.c, aarch64-without-fpu.c): New targets.
8977 * configure.srv (aarch64*-*-linux*): New.
8978 * linux-aarch64-low.c: New file.
8979
56f7af9c
MS
89802013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8981
43aaf8b6 8982 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8983 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8984 (dequeue_one_deferred_signal, linux_resume_one_thread)
8985 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8986 (linux_tracefork_grandchild, linux_test_for_tracefork)
8987 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8988 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8989 where the argument is 0.
8990
60f662b0
YQ
89912013-01-25 Yao Qi <yao@codesourcery.com>
8992
8993 * event-loop.c: Include "queue.h".
8994 (gdb_event_p): New typedef.
8995 (struct gdb_event) <next_event>: Remove.
8996 (event_queue): Change to QUEUE(gdb_event_p).
8997 (async_queue_event): Remove.
8998 (gdb_event_xfree): New.
8999 (initialize_event_loop): New.
9000 (process_event): Use API from QUEUE.
9001 (wait_for_event): Likewise.
9002 * server.c (main): Call initialize_event_loop.
9003 * server.h (initialize_event_loop): Declare.
9004
5ae4861a
YQ
90052013-01-18 Yao Qi <yao@codesourcery.com>
9006
9007 * ax.h (struct eval_agent_expr_context): New.
9008 (gdb_eval_agent_expr): Update declaration.
9009 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9010 TFRAME. Add new argument CTX.
9011 * server.h (struct eval_agent_expr_context): Declare.
9012 (agent_mem_read, agent_tsv_read): Update declaration.
9013 (agent_mem_read_string): Likewise.
9014 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9015 (add_traceframe_block): Add new argument TPOINT.
9016 Increase TPOINT->traceframe_usage.
9017 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9018 eval_tracepoint_agent_expr.
9019 (condition_true_at_tracepoint): Likewise.
9020 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9021 (agent_mem_read_string, agent_tsv_read): Likewise.
9022
85e00e85
YQ
90232013-01-16 Yao Qi <yao@codesourcery.com>
9024
9025 * linux-low.c (linux_resume_one_lwp): Don't check
9026 'lwp->bp_reinsert != 0'.
9027
4039cf45
JB
90282013-01-07 Joel Brobecker <brobecker@adacore.com>
9029 Pedro Alves <palves@redhat.com>
9030
9031 * lynx-low.c (ptrace_request_to_str): Define a temporary
9032 macro and use it to simplify this function's implementation.
9033
9044dee2
JB
90342013-01-07 Joel Brobecker <brobecker@adacore.com>
9035
9036 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9037 sets errno.
9038
e6352c8f
JB
90392013-01-07 Joel Brobecker <brobecker@adacore.com>
9040
9041 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9042
50681a27
JB
90432013-01-07 Joel Brobecker <brobecker@adacore.com>
9044
9045 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9046
3f6e77ef
JB
90472013-01-07 Joel Brobecker <brobecker@adacore.com>
9048
9049 * lynx-low.c (lynx_resume): Use the resume_info parameter
9050 to determine the ptid for the lynx_ptrace call, unless
9051 it is equal to minus_one_ptid, in which case we use the
9052 ptid of the current_inferior.
9053 (lynx_wait_1): After having received a thread create/exit
9054 event, resume the inferior's execution using the signaling
9055 thread's ptid, rather than the old ptid.
9056
7fda33ae
JB
90572013-01-07 Joel Brobecker <brobecker@adacore.com>
9058
9059 * lynx-low.c (lynx_resume): Delete variable ret.
9060
b9786c74
JB
90612013-01-01 Joel Brobecker <brobecker@adacore.com>
9062
9063 * gdbreplay.c (gdbreplay_version): Update copyright year.
9064 * server.c (gdbserver_version): Likewise.
9065
8b93d60f
JB
90662012-12-17 Joel Brobecker <brobecker@adacore.com>
9067
9068 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9069 new thread.
9070
037335a7
JB
90712012-12-17 Joel Brobecker <brobecker@adacore.com>
9072
9073 * lynx-low.c (ptrace_request_to_str): Add handling for
9074 PTRACE_GETTRACESIG.
9075
52d4cbd8
JB
90762012-12-17 Joel Brobecker <brobecker@adacore.com>
9077
9078 * lynx-low.c (lynx_attach): Delete variable new_process.
9079
ab8f6ca9
JB
90802012-12-17 Joel Brobecker <brobecker@adacore.com>
9081
9082 * lynx-low.c (lynx_create_inferior): Delete variable
9083 new_process.
9084
78cbc024
JB
90852012-12-17 Joel Brobecker <brobecker@adacore.com>
9086
9087 * lynx-low.c (ptrace_request_to_str): Do not handle
9088 PTRACE_GETTHREADLIST if this macro does not exist.
9089
14a00470
YQ
90902012-12-15 Yao Qi <yao@codesourcery.com>
9091
9092 * Makefile.in (OBS): Add notif.o.
9093 * notif.c, notif.h: New.
9094 * server.c: Include "notif.h".
9095 (struct vstop_notif) <next>: Remove.
9096 <base>: New field.
9097 (queue_stop_reply): Update.
9098 (push_event, send_next_stop_reply): Remove.
9099 (discard_queued_stop_replies): Update.
9100 (notif_stop): New variable.
9101 (handle_v_stopped): Remove.
9102 (handle_v_requests): Don't call handle_v_stopped. Call
9103 handle_ack_notif instead.
9104 (queue_stop_reply_callback): Call notif_event_enque instead
9105 of queue_stop_reply.
9106 (handle_status): Don't call send_next_stop_reply, call
9107 notif_write_event instead.
9108 (kill_inferior_callback): Likewise.
9109 (detach_or_kill_inferior_callback): Likewise.
9110 (main): Call initialize_notif.
9111 (process_serial_event): Call QUEUE_is_empty.
9112 (handle_target_event): Call notif_push instead of push event.
9113 * server.h (push_event): Remove declaration.
9114
61c125b9
TT
91152012-12-10 Tom Tromey <tromey@redhat.com>
9116
9117 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9118 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9119 macros.
9120 (.c.o): Rewrite.
9121 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9122 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9123 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9124 (amd64-linux-ipa.o, ax.o): Rewrite.
9125 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9126 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9127 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9128 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9129 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9130 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9131 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9132 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9133 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9134 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9135 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9136 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9137 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9138 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9139 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9140 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9141 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9142 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9143 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9144 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9145 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9146 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9147 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9148 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9149 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9150 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9151 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9152 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9153 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9154 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9155 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9156 (reg-tilegx.o): Remove.
9157 (all_object_files): New macro.
9158 Include .deps files.
9159 * aclocal.m4, configure: Rebuild.
9160 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9161 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9162 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9163
e90e9ad9
TT
91642012-12-05 Tom Tromey <tromey@redhat.com>
9165
9166 PR gdb/14917:
9167 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9168
02d403bf 91692012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9170
9171 * configure.ac: Check for linux/perf_event.h.
9172 * config.in: Regenerated.
9173 * configure: Regenerated.
9174
0270a750
PA
91752012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9176
9177 * hostio.c (handle_readlink): Decrease buffer size
9178 parameter passed to readlink by one byte.
9179
8c29b58e
YQ
91802012-11-26 Yao Qi <yao@codesourcery.com>
9181
9182 * configure.ac (build_warnings): Append '-Wempty-body'.
9183 * configure: Regenerated.
9184 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9185 body.
9186
8bdce1ff
PM
91872012-11-15 Pierre Muller <muller@sourceware.org>
9188
9189 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9190 * config.in: Regenerate.
9191 * configure: Regenerate.
9192 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9193 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9194 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9195 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9196 header.
9197 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9198 instead of <sys/wait.h> header.
9199 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9200
02d403bf 92012012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9202
9203 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9204 (various make rules): Remove -DGDBSERVER
9205
fbd5db48
YQ
92062012-11-09 Yao Qi <yao@codesourcery.com>
9207
9208 * spu-low.c (current_ptid): Move it to ..
9209 * gdbthread.h: ... here. New.
9210 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9211 * server.c (myresume, process_serial_event): Likewise.
9212 * thread-db.c (thread_db_find_new_threads): Likewise.
9213 * tracepoint.c (run_inferior_command): Likewise.
9214
b3dc46ff
AB
92152012-10-01 Andrew Burgess <aburgess@broadcom.com>
9216
9217 * server.c (handle_search_memory_1): Include access length in
9218 warning message.
9219
07c04788
HPN
92202012-09-05 Michael Brandt <michael.brandt@axis.com>
9221
9222 * linux-crisv32-low.c: Fix compile errors.
9223
918d227b
YQ
92242012-09-04 Yao Qi <yao@codesourcery.com>
9225
9226 * tracepoint.c (cmd_qtsv): Adjust debug message.
9227 Don't check CUR_TPOINT.
9228
18c1b81a
YQ
92292012-08-28 Yao Qi <yao@codesourcery.com>
9230
9231 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9232 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9233 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9234 Remove declarations of xmalloc, xreallloc, xstrdup and
9235 freeargv.
9236 * Makefile.in (libiberty_h): New.
9237 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9238 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9239
dc82f37b
YQ
92402012-08-23 Yao Qi <yao@codesourcery.com>
9241
9242 * server.h: Remove declaration of 'xsnprintf'.
9243
406b1477
KS
92442012-08-22 Keith Seitz <keiths@redhat.com>
9245
9246 * server.h: Include build-gnulib-gbserver/config.h.
9247 * gdbreplay.c: Likewise.
9248
e6712ff1
DE
92492012-08-08 Doug Evans <dje@google.com>
9250
9251 * Makefile.in (SFILES): Add gdb_vecs.c.
9252 (OBS): Add gdb_vecs.o.
9253 (gdb_vecs_h, host_defs_h): New variables.
9254 (thread-db.o): Add $(gdb_vecs_h) dependency.
9255 (gdb_vecs.o): New rule.
9256 * thread-db.c: #include "gdb_vecs.h".
9257 (thread_db_load_search): Use a vector to iterate over path elements.
9258 Handle text appearing after "$pdir".
9259
9260 * configure.ac: Add check for strstr.
9261 * config.in: Regenerate.
9262 * configure: Regenerate.
9263
7c3270ae
UW
92642012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9265
9266 * hostio.c (handle_pread): If pread fails, fall back to attempting
9267 lseek/read.
9268 (handle_pwrite): Likewise for pwrite.
9269
b62e2b27
UW
92702012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9271
9272 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9273 between unsupported TYPE and unimplementable ADDR/LEN combination.
9274 (arm_insert_point): Act on new return value.
9275
78a99e91
PA
92762012-07-31 Pedro Alves <palves@redhat.com>
9277
9278 * server.c (process_point_options): Only skip tokens if we find
9279 one that is unrecognized. Don't treat 'X' specially while
9280 skipping unrecognized tokens.
9281
fcf303ab
UW
92822012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9283
9284 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9285 to 4-byte-align HW breakpoint addresses for Thumb.
9286
7255706c
YQ
92872012-07-27 Yao Qi <yao@codesourcery.com>
9288
9289 PR remote/14161.
9290
9291 * server.h: Declare gdb_agent_about_to_close.
9292 * target.c (kill_inferior): Include "agent.h".
9293 New. Send command 'kill'.
9294 * target.h (kill_inferior): Removed macro.
9295 * tracepoint.c (gdb_agent_about_to_close): New.
9296 (gdb_agent_helper_thread): Handle command 'close'.
9297 Wait endlessly until the inferior stops.
9298 Install gdb_agent_remove_socket to atexit hook.
9299 (agent_socket_name): New static variable.
9300 (gdb_agent_socket_init): Replace local variable 'name' with
9301 'agent_socket_name'.
9302 (gdb_agent_remove_socket): New.
9303
5a3f286f
YQ
93042012-07-27 Yao Qi <yao@codesourcery.com>
9305
9306 * server.c (process_point_options): Stop at 'X' when parsing.
9307
961bd387
ME
93082012-07-19 Michael Eager <eager@eagercon.com>
9309
a261b8f5 9310 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9311 to hw_execute.
9312 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9313 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9314 hardware breakpoint.
9315
aa7c7447
JK
93162012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9317
9318 * gdbserver/linux-low.c (initialize_low): Call
9319 linux_ptrace_init_warnings.
9320
7f216e7c
DE
93212012-07-02 Doug Evans <dje@google.com>
9322
9323 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9324 pointer to int.
9325
d3ce09f5
SS
93262012-07-02 Stan Shebs <stan@codesourcery.com>
9327
9328 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9329 (ax.o): Add it to build rule.
9330 (ax-ipa.o): Ditto.
9331 (OBS): Add format.o.
9332 (IPA_OBS): Add format.o.
9333 * server.c (handle_query): Claim support for breakpoint commands.
9334 (process_point_options): Add command case.
9335 (process_serial_event): Leave running if there are printfs in
9336 effect.
9337 * mem-break.h (any_persistent_commands): Declare.
9338 (add_breakpoint_commands): Declare.
9339 (gdb_no_commands_at_breakpoint): Declare.
9340 (run_breakpoint_commands): Declare.
9341 * mem-break.c (struct point_command_list): New struct.
9342 (struct breakpoint): New field command_list.
9343 (any_persistent_commands): New function.
9344 (add_commands_to_breakpoint): New function.
9345 (add_breakpoint_commands): New function.
9346 (gdb_no_commands_at_breakpoint): New function.
9347 (run_breakpoint_commands): New function.
9348 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9349 locally.
9350 * ax.c: Include format.h.
9351 (ax_printf): New function.
9352 (gdb_eval_agent_expr): Add printf opcode.
9353
2f8f6aed
YQ
93542012-06-13 Yao Qi <yao@codesourcery.com>
9355
9356 * server.c (start_inferior): Remove duplicated writes to fields
9357 'last_resume_kind' and 'last_status' of 'current_inferior'.
9358
0c9070b3
YQ
93592012-06-12 Yao Qi <yao@codesourcery.com>
9360 Pedro Alves <palves@redhat.com>
9361
9362 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9363 comment.
9364 * server.c (handle_v_cont): Extend comment.
9365
c52daf70
YQ
93662012-06-11 Yao Qi <yao@codesourcery.com>
9367
9368 * linux-low.c (linux_attach): Add 'static'.
9369
d38bbb0a
YQ
93702012-06-06 Yao Qi <yao@codesourcery.com>
9371
9372 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9373
89dc0afd
JK
93742012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9375
9376 Fix gcc -flto compilation warning.
9377 * server.c (main): Make variable multi_mode and attach volatile.
9378
75f62ce7
TJB
93792012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9380
9381 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9382 if the platform doesn't know about it.
9383
65f479b6
PA
93842012-05-30 Jeff Kenton <jkenton@tilera.com>
9385
9386 * Makefile.in (SFILES): Add linux-tile-low.c.
9387 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9388 * configure.srv: Handle tilegx-*-linux*.
9389 * linux-tile-low.c: New file.
9390
0c5bf5a9
JK
93912012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9392
9393 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9394
a493e3e2
PA
93952012-05-24 Pedro Alves <palves@redhat.com>
9396
9397 PR gdb/7205
9398
43aaf8b6 9399 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9400
2ea28649
PA
94012012-05-24 Pedro Alves <palves@redhat.com>
9402
9403 PR gdb/7205
9404
9405 Replace target_signal with gdb_signal throughout.
9406
8d409d16
MR
94072012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9408
9409 * linux-low.c (linux_store_registers): Avoid the copying sequence
9410 when no data has been retrieved by ptrace.
9411
23512c01
MGD
94122012-05-22 Will Deacon <will.deacon@arm.com>
9413
9414 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9415 Include asm/ptrace.h.
9416 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9417 already defined.
9418
4934b29e
MR
94192012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9420
9421 * linux-low.c (linux_store_registers): Don't re-retrieve data
9422 with ptrace that has already been obtained from /proc. Always
9423 copy any data retrieved with ptrace to the buffer supplied.
9424
bde24c0a
PA
94252012-05-11 Yao Qi <yao@codesourcery.com>
9426 Pedro Alves <palves@redhat.com>
9427
9428 * linux-low.c (enum stopping_threads_kind): New.
9429 (stopping_threads): Change type to `enum stopping_threads_kind'.
9430 (handle_extended_wait): If stopping and suspending threads, leave
9431 the new_lwp suspended too.
9432 (linux_wait_for_event): Adjust.
9433 (stop_all_lwps): Set `stopping_threads' to
9434 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9435 whether we're suspending threads or just stopping them. Assert no
9436 recursion happens.
9437
623b6bdf
YQ
94382012-04-29 Yao Qi <yao@codesourcery.com>
9439
9440 * server.h: Move some code to ...
9441 * gdbthread.h: ... here. New.
9442 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9443 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9444 (nto-low.o, win32-low.o): Likewise.
9445 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9446 * regcache.c, remote-utils.c, server.c: Likewise.
9447 * target.c, tracepoint.c, win32-low.c: Likewise.
9448
f15f9948
TJB
94492012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9450
9451 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9452 (PTRACE_ARG4_TYPE): Likewise.
9453 (PTRACE_XFER_TYPE): Likewise.
9454 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9455 ptrace to PTRACE_ARG3_TYPE.
9456 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9457 (PTRACE_ARG4_TYPE): Likewise.
9458 (PTRACE_XFER_TYPE): Likewise.
9459 (linux_detach_one_lwp): Cast fourth argument of
9460 ptrace to long then PTRACE_ARG4_TYPE.
9461 (regsets_fetch_inferior_registers): Cast third argument of
9462 ptrace to long then PTRACE_ARG3_TYPE.
9463 (regsets_store_inferior_registers): Likewise.
9464
38ea300a
PA
94652012-04-20 Pedro Alves <palves@redhat.com>
9466
9467 * configure: Regenerate.
9468
c971b7fa
PA
94692012-04-19 Pedro Alves <palves@redhat.com>
9470
43aaf8b6 9471 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9472 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9473 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9474 (all, install-only, uninstall, clean-info, all-lib, clean): No
9475 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9476 (maintainer-clean realclean distclean): Use subdir_do.
9477 (subdir_do): New.
9478 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9479 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9480 * acinclude.m4: Include acx_configure_dir.m4.
9481 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9482 calls. Call AC_PROG_RANLIB. Configure gnulib using
9483 ACX_CONFIGURE_DIR.
9484 (GNULIB): New.
9485 (GNULIB_STDINT_H): Adjust.
9486 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9487 * gdbreplay.c: Include build-gnulib/config.h.
9488 * server.h: Likewise.
9489 * aclocal.m4: Regenerate.
9490 * config.in: Regenerate.
9491 * configure: Regenerate.
c971b7fa 9492
809277f8
PA
94932012-04-19 Pedro Alves <palves@redhat.com>
9494
9495 * Makefile.in (LIBGNU, INCGNU): Adjust.
9496 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9497 (all, install-only, uninstall, clean-info, all-lib, clean)
9498 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9499 * configure.ac: Adjust AC_OUTPUT output.
9500 * aclocal.m4: Regenerate.
9501 * configure: Regenerate.
9502
fd9bb8b8
PA
95032012-04-19 Pedro Alves <palves@redhat.com>
9504
9505 * Makefile.in (generated_files): New.
9506 (server_h): Remove the explicit dependency on config.h, and depend
9507 on $generated_files.
9508
1c298c66
PA
95092012-04-19 Pedro Alves <palves@redhat.com>
9510
9511 * Makefile.in (INCGNU): Add -Ignulib.
9512
57c4b50b
PA
95132012-04-19 Pedro Alves <palves@redhat.com>
9514
9515 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9516 (INCGNU): ... this, and spell out -I here.
9517 (GNULIB_LIB): Rename to ...
9518 (LIBGNU): ... this.
9519 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9520
1030e047
PA
95212012-04-19 Pedro Alves <palves@redhat.com>
9522
9523 * config.in: Regenerate.
9524
447d4319
PA
95252012-04-19 Pedro Alves <palves@redhat.com>
9526
9527 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9528 * server.h (memmem): Remove declaration.
9529 * config.in: Regenerate.
9530 * configure: Regenerate.
9531
aad9eab9
YQ
95322012-04-19 Yao Qi <yao@codesourcery.com>
9533
9534 * Makefile.in (SFILES): Add common/vec.c.
9535 (OBS): Add vec.o.
9536 (vec.o): New rule.
9537
3e10640f
YQ
95382012-04-19 Yao Qi <yao@codesourcery.com>
9539
9540 * remote-utils.c (prepare_resume_reply): Replace with macro
9541 target_core_of_thread.
9542 * server.c (handle_qxfer_threads_proper): Likewise.
9543 * target.h (traget_core_of_thread): New macro.
9544
71622373
PA
95452012-04-18 Pedro Alves <palves@redhat.com>
9546
9547 * aclocal.m4: Regenerate.
9548 * configure: Regenerate.
9549
80d26939
YQ
95502012-04-16 Yao Qi <yao@codesourcery.com>
9551
9552 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9553 duplicated on address.
9554
42476b70
YQ
95552012-04-16 Yao Qi <yao@codesourcery.com>
9556
9557 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9558 (struct tracepoint_action_ops) <send>: New field.
9559 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9560 (agent_expr_send, x_tracepoint_action_send): New.
9561 (l_tracepoint_action_send): New.
9562 (cmd_qtdp): Download and install tracepoint
9563 according to `use_agent'.
9564 (run_inferior_command): Add one more parameter `len'.
9565 Update callers.
9566 (tracepoint_send_agent): New.
9567 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9568
7bc83639
YQ
95692012-04-16 Yao Qi <yao@codesourcery.com>
9570
9571 * tracepoint.c (download_tracepoints): Moved to ...
9572 (cmd_qtstart): ... here.
9573
5f18041e
YQ
95742012-04-14 Yao Qi <yao@codesourcery.com>
9575
9576 * tracepoint.c: Include inttypes.h.
9577 (struct collect_memory_action): Use sized types.
9578 (struct tracepoint): Likewise.
9579 (cmd_qtdp, stop_tracing): Update print specifiers.
9580 (cmd_qtp, response_tracepoint): Likewise.
9581 (collect_data_at_tracepoint): Likewise.
9582 (collect_data_at_step): Likewise.
9583
55a8c076
YQ
95842012-04-14 Yao Qi <yao@codesourcery.com>
9585
9586 Import gnulib module inttypes.
9587 * aclocal.m4, config.in, configure: Regenerated.
9588
dc750257
YQ
95892012-04-14 Yao Qi <yao@codesourcery.com>
9590
9591 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9592 Makefile and config.status at last.
9593
0ab5faf9
YQ
95942012-04-13 Yao Qi <yao@codesourcery.com>
9595
9596 * tracepoint.c: Include stdint.h unconditionally.
9597
18f5fd81
TJB
95982012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9599
9600 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9601 on BFD_HAVE_SYS_PROCFS_TYPE.
9602 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9603 * configure: Regenerate.
9604 * config.in: Likewise.
9605
4d47af5c
L
96062012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9607
9608 * Makefile.in (clean): Also remove x32.c x32-linux.c
9609 x32-avx.c x32-avx-linux.c.
9610 (x32.o): New target.
9611 (x32.c): Likewise.
9612 (x32-linux.o): Likewise.
9613 (x32-linux.c): Likewise.
9614 (x32-avx.o): Likewise.
9615 (x32-avx.c): Likewise.
9616 (x32-avx-linux.o): Likewise.
9617 (x32-avx-linux.c): Likewise.
9618
9619 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9620 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9621 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9622 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9623 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9624 i386/x32-avx-linux.xml.
9625
9626 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9627 (init_registers_x32_avx_linux): Likwise.
9628 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9629 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9630
ecedbe58
PA
96312012-04-13 Pedro Alves <palves@redhat.com>
9632
9633 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9634 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9635 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9636 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9637 the sub-make.
9638
c92b5177
L
96392012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9640
9641 * linux-x86-low.c (compat_x32_clock_t): New.
9642 (compat_x32_siginfo_t): Likewise.
9643 (compat_x32_siginfo_from_siginfo): Likewise.
9644 (siginfo_from_compat_x32_siginfo): Likewise.
9645 (linux_is_elf64): Likewise.
9646 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9647 and siginfo_from_compat_x32_siginfo for x32.
9648 (x86_arch_setup): Set linux_is_elf64.
9649
214d508e
L
96502012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9651
9652 PR gdb/13969
9653 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9654 e_machine field.
9655 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9656 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9657 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9658 compatible with process.
9659
c9a1864a
YQ
96602012-04-12 Yao Qi <yao@codesourcery.com>
9661
9662 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9663 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9664 (install-only, install-info, clean): Handle sub dir gnulib.
9665 (all-lib, am--refresh): New targets.
9666 (memmem.o): Remove target.
9667 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9668 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9669 (AC_REPLACE_FUNCS): Remove memmem.
9670 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9671 (AC_OUTPUT): Generate Makefile in gnulib/.
9672 * aclocal.m4, config.in, configure: Regenerated.
9673
367ba2c2
MR
96742012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9675
9676 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9677
9d236627
PA
96782012-04-05 Pedro Alves <palves@redhat.com>
9679
9680 -Werror=strict-aliasing
9681
9682 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9683 pointer.
9684
111217b3
PA
96852012-04-04 Pedro Alves <palves@redhat.com>
9686
9687 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9688 (sparc_store_gregset_from_stack, sparc_store_gregset)
9689 (sparc_breakpoint_at): Fix formatting.
9690
8365dcf5
TJB
96912012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9692
9693 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9694 are available.
9695 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9696 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9697 * config.in: Regenerate.
9698 * configure: Likewise.
9699
689cc2ae
PA
97002012-03-29 Pedro Alves <palves@redhat.com>
9701
9702 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9703 Correct ptrace arguments.
9704
c14dfd32
PA
97052012-03-28 Pedro Alves <palves@redhat.com>
9706
9707 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9708 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9709 (IA64_FR1_REGNUM): New defines.
9710 (ia64_fetch_register): New.
9711 (the_low_target): Install it.
9712 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9713 field.
9714 * linux-low.c (linux_fetch_registers): Try the
9715 the_low_target.fetch_register hook first.
9716
9717 * linux-arm-low.c (the_low_target): Adjust.
9718 * linux-bfin-low.c (the_low_target): Adjust.
9719 * linux-cris-low.c (the_low_target): Adjust.
9720 * linux-crisv32-low.c (the_low_target): Adjust.
9721 * linux-m32r-low.c (the_low_target): Adjust.
9722 * linux-m68k-low.c (the_low_target): Adjust.
9723 * linux-mips-low.c (the_low_target): Adjust.
9724 * linux-ppc-low.c (the_low_target): Adjust.
9725 * linux-s390-low.c (the_low_target): Adjust.
9726 * linux-sh-low.c (the_low_target): Adjust.
9727 * linux-sparc-low.c (the_low_target): Adjust.
9728 * linux-tic6x-low.c (the_low_target): Adjust.
9729 * linux-x86-low.c (the_low_target): Adjust.
9730 * linux-xtensa-low.c (the_low_target): Adjust.
9731
63c88e13
PA
97322012-03-26 Pedro Alves <palves@redhat.com>
9733
9734 * server.c (handle_qxfer_libraries): Don't bail early if
9735 the_target->qxfer_libraries_svr4 is not NULL.
9736
fb723180
PA
97372012-03-26 Pedro Alves <palves@redhat.com>
9738
9739 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9740
0afae3cf
PA
97412012-03-23 Pedro Alves <palves@redhat.com>
9742
9743 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9744 "library-list-svr4" element's start tag when the the DSO list is
9745 empty.
9746
485f1ee4
PA
97472012-03-23 Pedro Alves <palves@redhat.com>
9748
9749 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9750 a variable whose type size is the same as the inferior's pointer
9751 size.
9752
a5362b9a
TS
97532012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9754
9755 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9756 struct siginfo.
9757 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9758 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9759 * linux-low.h: Include <signal.h>.
9760 (struct siginfo): Remove forward declaration.
9761 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9762 struct siginfo.
9763
d226c142
MF
97642012-03-21 Mike Frysinger <vapier@gentoo.org>
9765
9766 * .gitignore: Ignore more files.
9767
122f36ef
PA
97682012-03-19 Pedro Alves <palves@redhat.com>
9769 Jan Kratochvil <jan.kratochvil@redhat.com>
9770
9771 * server.c (cont_thread, general_thread): Add describing comments.
9772 (start_inferior): Clear `cont_thread'.
9773 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9774 of a process.
9775
fc3e5175
YQ
97762012-03-15 Yao Qi <yao@codesourcery.com>
9777
9778 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9779 handling to ...
9780 (cmd_qtdp): ... here.
9781
8d0d92cd
YQ
97822012-03-15 Yao Qi <yao@codesourcery.com>
9783
9784 * tracepoint.c (struct tracepoint_action_ops): New.
9785 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9786 (m_tracepoint_action_download): New.
9787 (r_tracepoint_action_download): New.
9788 (x_tracepoint_action_download): New.
9789 (l_tracepoint_action_download): New.
9790 (add_tracepoint_action): Install `action->ops' according type.
9791 (download_tracepoint_1): Move code `download' function pointer
9792 of various tracepoint_action_ops.
9793
87b0bb13
JK
97942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9795
9796 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9797 linux_ptrace_attach_warnings.
9798
5f572dec
JK
97992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9800
9801 * Makefile.in (linux-ptrace.o): New.
9802 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9803 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9804 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9805 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9806 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9807 of these targets.
9808 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9809
f4647387
YQ
98102012-03-08 Yao Qi <yao@codesourcery.com>
9811 Pedro Alves <palves@redhat.com>
9812
9813 Fix PR server/13392.
9814 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9815 offset of JMP insn.
9816 * tracepoint.c (remove_tracepoint): New.
9817 (cmd_qtdp): Call remove_tracepoint when failed to install.
9818
9b224c5e
PA
98192012-03-07 Pedro Alves <palves@redhat.com>
9820
9821 * linux-low.c (get_detach_signal): New.
9822 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9823 Pass on pending signals to PTRACE_DETACH. Check the result of the
9824 ptrace call.
9825 * server.c (program_signals, program_signals_p): New.
9826 (handle_general_set): Handle QProgramSignals.
9827 * server.h (program_signals, program_signals_p): Declare.
9828
e237a7e2
JK
98292012-03-05 Pedro Alves <palves@redhat.com>
9830 Jan Kratochvil <jan.kratochvil@redhat.com>
9831
9832 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9833 New comment why.
9834
5808517f
YQ
98352012-03-03 Yao Qi <yao@codesourcery.com>
9836
9837 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9838 agent_look_up_symbols.
9839
58b4daa5
YQ
98402012-03-03 Yao Qi <yao@codesourcery.com>
9841
9842 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9843 (linux-x86-low.o): Likewise.
9844 * server.h: Remove in_process_agent_loaded.
9845 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9846 common/agent.c.
9847 Update callers.
9848
8ffcbaaf
YQ
98492012-03-03 Yao Qi <yao@codesourcery.com>
9850
9851 * tracepoint.c (gdb_agent_capability): New global.
9852 (in_process_agent_loaded_ust): Renamed to
9853 `in_process_agent_supports_ust'.
9854 Update callers.
9855 (in_process_agent_supports_ust): Call agent_capability_check.
9856 (clear_installed_tracepoints): Assert that agent supports
9857 agent.
9858
d1feda86
YQ
98592012-03-03 Yao Qi <yao@codesourcery.com>
9860
9861 * linux-low.c (linux_supports_agent): New.
9862 (linux_target_ops): Initialize field `supports_agent' with
9863 linux_supports_agent.
9864 * target.h (struct target_ops) <supports_agent>: New.
9865 (target_supports_agent): New macro.
9866 * server.c (handle_general_set): Handle packet 'QAgent'.
9867 (handle_query): Send `QAgent+'.
9868 * Makefile.in (server.o): Depends on agent.h.
9869
2fa291ac
YQ
98702012-03-03 Yao Qi <yao@codesourcery.com>
9871
9872 * Makefile.in (OBS): Add agent.o.
9873 Add new rule for agent.o.
9874 Track dependence of tracepoint.c on agent.h.
9875 * tracepoint.c (run_inferior_command_1):
9876 (run_inferior_command): Call agent_run_command.
9877 (gdb_ust_connect_sync_socket): Deleted. Move it to
9878 common/agent.c.
9879 (resume_thread, stop_thread): Likewise.
9880 (gdb_ust_socket_init): Renamed to ...
9881 (gdb_agent_socket_init): ... New.
9882 (gdb_ust_thread): Renamed to ...
9883 (gdb_agent_helper_thread): ... New.
9884 (gdb_ust_init): Move some code to ...
9885 (gdb_agent_init): ... here. New.
9886 [HAVE_UST]: Call gdb_ust_init.
9887 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9888 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9889 * config.in, configure: Regenerated.
9890
05044653
PA
98912012-03-02 Pedro Alves <palves@redhat.com>
9892
9893 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9894 * linux-low.c (struct simple_pid_list): New.
9895 (stopped_pids): New a struct simple_pid_list pointer.
9896 (add_to_pid_list, pull_pid_from_list): New.
9897 (handle_extended_wait): Don't assume the first signal new children
9898 report is SIGSTOP. Adjust call to pull_pid_from_list.
9899 (linux_wait_for_lwp): Adjust.
9900
8d00225b
YQ
99012012-03-02 Yao Qi <yao@codesourcery.com>
9902
9903 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9904 debug log.
9905
19560ba5
YQ
99062012-03-02 Yao Qi <yao@codesourcery.com>
9907
9908 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9909 `stop_pc' and `tpoint'. Update caller.
9910
1faeff08
MR
99112012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9912
9913 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9914 * linux-low.c (use_linux_regsets): New macro.
9915 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9916 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9917 (linux_register_in_regsets): New function.
9918 (usr_fetch_inferior_registers): Skip registers covered by
9919 regsets.
9920 (usr_store_inferior_registers): Likewise.
9921 (usr_fetch_inferior_registers): New macro.
9922 (usr_store_inferior_registers): Likewise.
9923 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9924 (linux_store_registers): Likewise.
9925 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9926 prototype.
9927 (init_registers_mips64_dsp_linux): Likewise.
9928 (init_registers_mips_linux): New macro.
9929 (init_registers_mips_dsp_linux): Likewise.
9930 (mips_dsp_num_regs): Likewise.
9931 (DSP_BASE, DSP_CONTROL): New fallback macros.
9932 (mips_base_regs): New macro.
9933 (mips_regmap): Use it. Fix the size.
9934 (mips_dsp_regmap): New variable.
9935 (mips_dsp_regset_bitmap): Likewise.
9936 (mips_arch_setup): New function.
9937 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9938 than mips_regmap.
9939 (mips_cannot_store_register): Likewise.
9940 (the_low_target): Update .arch_setup, .num_regs and .regmap
9941 initializers. Add .regset_bitmap initializer.
9942 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9943 initializer.
9944 * linux-bfin-low.c (the_low_target): Likewise.
9945 * linux-cris-low.c (the_low_target): Likewise.
9946 * linux-crisv32-low.c (the_low_target): Likewise.
9947 * linux-ia64-low.c (the_low_target): Likewise.
9948 * linux-m32r-low.c (the_low_target): Likewise.
9949 * linux-m68k-low.c (the_low_target): Likewise.
9950 * linux-ppc-low.c (the_low_target): Likewise.
9951 * linux-s390-low.c (the_low_target): Likewise.
9952 * linux-sh-low.c (the_low_target): Likewise.
9953 * linux-sparc-low.c (the_low_target): Likewise.
9954 * linux-tic6x-low.c (the_low_target): Likewise.
9955 * linux-x86-low.c (the_low_target): Likewise.
9956 * linux-xtensa-low.c (the_low_target): Likewise.
9957 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9958 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9959 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9960 srv_xmlfiles.
9961 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9962 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9963
c03e6ccc
YQ
99642012-02-29 Yao Qi <yao@codesourcery.com>
9965 Pedro Alves <palves@redhat.com>
9966
9967 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9968 `step_over_finished' is true.
9969
644cebc9
PA
99702012-02-27 Pedro Alves <palves@redhat.com>
9971
9972 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9973 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9974
c14d7ab2
PA
99752012-02-27 Pedro Alves <palves@redhat.com>
9976
9977 PR server/9684
9978 * linux-low.c (pid_is_stopped): New.
9979 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9980
412c89dd
LM
99812012-02-25 Luis Machado <lgustavo@codesourcery.com>
9982
9983 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9984 of conditions.
9985
b745defe
MR
99862012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9987
9988 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9989
9f3a5c85
LM
99902012-02-24 Luis Machado <lgustavo@codesourcery>
9991
9992 * server.c (handle_query): Advertise support for target-side
9993 breakpoint condition evaluation.
9994 (process_point_options): New function.
9995 (process_serial_event): When inserting a breakpoint, check for
9996 a target-side condition that should be evaluated.
9997
9998 * mem-break.c: Include regcache.h and ax.h.
9999 (point_cond_list_t): New data structure.
10000 (breakpoint) <cond_list>: New field.
10001 (find_gdb_breakpoint_at): Make non-static.
10002 (delete_gdb_breakpoint_at): Clear any target-side
10003 conditions.
10004 (clear_gdb_breakpoint_conditions): New function.
10005 (add_condition_to_breakpoint): Likewise.
10006 (add_breakpoint_condition): Likewise.
10007 (gdb_condition_true_at_breakpoint): Likewise.
10008 (gdb_breakpoint_here): Return result directly instead
10009 of going through a local variable.
10010
10011 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10012 (clear_gdb_breakpoint_conditions): Likewise.
10013 (add_breakpoint_condition): Likewise.
10014 (gdb_condition_true_at_breakpoint): Likewise.
10015
10016 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10017 (need_step_over_p): Take target-side breakpoint condition into
10018 consideration.
10019
5e1dc496
LM
100202012-02-24 Luis Machado <lgustavo@codesourcery>
10021
10022 * server.h: Include tracepoint.h.
10023 (agent_mem_read, agent_get_trace_state_variable_value,
10024 agent_set_trace_state_variable_value,
10025 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10026 get_set_tsv_func_addr): New prototypes.
10027
10028 * ax.h: New include file.
10029 * ax.c: New source file.
10030
10031 * tracepoint.c: Include ax.h.
10032 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10033 agent_expr, eval_result_type): Move to ax.h.
10034 (parse_agent_expr): Rename to ...
10035 (gdb_parse_agent_expr): ... this, make it non-static and move
10036 to ax.h.
10037 (unparse_agent_expr) Rename to ...
10038 (gdb_unparse_agent_expr): ... this, make it non-static and move
10039 to ax.h.
10040 (eval_agent_expr): Rename to ...
10041 (eval_tracepoint_agent_expr): ... this.
10042 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10043 forward declarations.
10044 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10045 (agent_get_trace_state_variable_value): New function.
10046 (agent_set_trace_state_variable_value): New function.
10047 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10048 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10049 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10050 (condition_true_at_tracepoint): Likewise.
10051 (parse_agent_expr): Rename to ...
10052 (gdb_parse_agent_expr): ... this and move to ax.c.
10053 (unparse_agent_expr): Rename to ...
10054 (gdb_unparse_agent_expr): ... this and move to ax.c.
10055 (gdb_agent_op_name): Move to ax.c.
10056 (eval_agent_expr): Rename to ...
10057 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10058 and move to ax.c.
10059 (eval_tracepoint_agent_expr): New function.
10060 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10061 non-static.
5e1dc496
LM
10062 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10063 ax.c.
10064 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10065 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10066 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10067 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10068 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10069 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10070 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10071 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10072 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10073 (compile_bytecodes): Remove forward declaration.
10074 (is_goto_target): Move to ax.c.
10075 (compile_bytecodes): Move to ax.c and call
10076 agent_get_trace_state_variable_value (...) and
10077 agent_set_trace_state_variable_value (...).
10078
10079 * Makefile.in: Update ax.c and IPA dependencies.
10080
277e4e52
PA
100812012-02-24 Pedro Alves <palves@redhat.com>
10082
10083 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10084 (cmd_bigqtbuffer_circular): ... this. Only handle
10085 'QTBuffer:circular:'.
10086 (handle_tracepoint_general_set): Adjust.
10087
bf4c19f7
YQ
100882012-02-16 Yao Qi <yao@codesourcery.com>
10089
10090 * inferiors.c: Move code to ...
10091 * dll.c: .... here. New.
10092 * server.h: Declare clear_dlls.
10093 * Makefile.in (SFILES): Add dll.c.
10094 (OBS): Add dll.o
10095 (dll.o): New rule.
10096
d73f2619
YQ
100972012-02-11 Yao Qi <yao@codesourcery.com>
10098
10099 * server.c: (handle_monitor_command): Add a new parameter
10100 `own_buf'.
10101 (handle_query): Update caller.
10102
f8255c2a
JB
101032012-02-09 Joel Brobecker <brobecker@adacore.com>
10104
10105 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10106 * configure, config.in: Regenerate.
10107 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10108 is not defined.
10109
da84f473
PA
101102012-02-02 Pedro Alves <palves@redhat.com>
10111
10112 Try SIGKILL first, then PTRACE_KILL.
10113 * linux-low.c (linux_kill_one_lwp): New.
10114 (linux_kill_one_lwp): Rename to ...
10115 (kill_one_lwp_callback): ... this. Use the new
10116 linux_kill_one_lwp.
10117
e886a173
PA
101182012-02-02 Pedro Alves <palves@redhat.com>
10119
10120 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10121 inferior.
10122
be07f1a2
PA
101232012-01-27 Pedro Alves <palves@redhat.com>
10124
10125 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10126 (elf_64_file_p): Make static.
10127 (linux_pid_exe_is_elf_64_file): New.
10128 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10129 Delete declarations.
10130 (linux_pid_exe_is_elf_64_file): Declare.
10131 * linux-x86-low.c (x86_arch_setup): Use
10132 linux_pid_exe_is_elf_64_file.
10133
d8301ad1
JK
101342012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10135
10136 * linux-low.c (linux_wait_for_event_1): Rename to ...
10137 (linux_wait_for_event): ... here and merge it with former
10138 linux_wait_for_event - new variable wait_ptid, use it.
10139 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10140
01b17894
PA
101412012-01-23 Pedro Alves <palves@redhat.com>
10142
10143 * server.c (main): Avoid yet another case of infinite loop while
10144 detaching/killing after a longjmp.
10145
e825046f
JK
101462012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10147
10148 Code cleanup.
10149 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10150
b9e7b9c3
UW
101512012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10152
10153 * hostio.c (handle_readlink): New function.
10154 (handle_vFile): Call it to handle "vFile:readlink" packets.
10155
901f9912
UW
101562012-01-20 Pedro Alves <palves@redhat.com>
10157 Ulrich Weigand <ulrich.weigand@linaro.org>
10158
10159 * server.c (handle_v_requests): Only support vAttach and vRun to
10160 start multiple processes when in extended protocol mode.
10161
fc1ab1a0
PA
101622012-01-17 Pedro Alves <palves@redhat.com>
10163
10164 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10165 memalign plus mprotect to allocate the scratch buffer.
10166
7d5d4e98
PA
101672012-01-13 Pedro Alves <palves@redhat.com>
10168
10169 * server.c (attach_inferior): Clear `cont_thread'.
10170
f128d5e9
PA
101712012-01-13 Pedro Alves <palves@redhat.com>
10172
10173 * server.c (main): Avoid infinite loop while detaching/killing
10174 after a longjmp.
10175
06db92f0
DE
101762012-01-09 Doug Evans <dje@google.com>
10177
10178 * server.c (start_inferior): Set last_ptid in --wrapper case.
10179
32d92999
YQ
101802012-01-06 Yao Qi <yao@codesourcery.com>
10181
10182 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10183 defined.
10184 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10185
5e0a92a9
YQ
101862012-01-04 Yao Qi <yao@codesourcery.com>
10187
10188 * tracepoint.c (cmd_qtdp): Print debug message
10189 for static tracepoint.
10190
ae639e8c
YQ
101912012-01-04 Yao Qi <yao@codesourcery.com>
10192
10193 * tracepoint.c (trace_vdebug): Differentiate debug message
10194 between gdbserver and IPA.
10195
f72429c5
YQ
101962012-01-03 Yao Qi <yao@codesourcery.com>
10197
10198 * tracepoint.c (tracepoint_was_hit): Don't collect for
10199 static tracepoint.
10200
12c3e59c
JB
102012012-01-02 Joel Brobecker <brobecker@adacore.com>
10202
10203 * terminal.h: Reformat copyright header.
10204
67827812
JB
102052012-01-02 Joel Brobecker <brobecker@adacore.com>
10206
10207 * server.c (gdbserver_version): Update copyright year.
10208 * gdbreplay.c (gdbreplay_version): Likewise.
10209
3e52c33d
JK
102102011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10211
10212 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10213
10214 Revert:
10215 2011-12-18 Hui Zhu <teawater@gmail.com>
10216 * linux-low.c (linux_create_inferior): Save return value to ret.
10217
66f1260e
HZ
102182011-12-18 Hui Zhu <teawater@gmail.com>
10219
10220 * linux-low.c (linux_create_inferior): Save return value to ret.
10221
e77616d7
DE
102222011-12-16 Doug Evans <dje@google.com>
10223
e7b06c57
DE
10224 * linux-low.c (linux_create_inferior): If stdio connection,
10225 redirect stdin from /dev/null, stdout to stderr.
10226 * remote-utils.c (remote_is_stdio): New static global.
10227 (remote_connection_is_stdio): New function.
10228 (remote_prepare): Handle stdio connection.
10229 (remote_open): Ditto.
10230 (remote_close): Don't close stdin for stdio connections.
10231 (read_prim,write_prim): New functions. Replace all calls to
10232 read/write to these.
10233 * server.c (main): Watch for "-" argument. Move call to
10234 remote_prepare before start_inferior.
10235 * server.h (STDIO_CONNECTION_NAME): New macro.
10236 (remote_connection_is_stdio): Declare.
10237
e77616d7
DE
10238 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10239 in debugging output.
10240
82067193
YQ
102412011-12-15 Yao Qi <yao@codesourcery.com>
10242
10243 * tracepoint.c: Include sys/syscall.h.
10244 (gdb_ust_thread): Remove preprocessor conditional.
10245
82bfbe7e
PA
102462011-12-14 Pedro Alves <pedro@codesourcery.com>
10247
10248 * linux-low.c (linux_detach_one_lwp): Call
10249 the_low_target.prepare_to_resume before detaching.
10250
712c6575
YQ
102512011-12-14 Yao Qi <yao@codesourcery.com>
10252
10253 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10254 of write.
10255
d54d1edf
YQ
102562011-12-14 Yao Qi <yao@codesourcery.com>
10257
10258 * i386-low.c (i386_low_stopped_data_address): Initialize local
10259 variable `control'.
10260
6210a125
PA
102612011-12-13 Pedro Alves <pedro@codesourcery.com>
10262
10263 PR remote/13492
10264
10265 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10266 DR_CONTROL unless necessary. Extend comments.
10267 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10268 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10269
2ece8244
YQ
102702011-12-13 Yao Qi <yao@codesourcery.com>
10271
10272 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10273 macros.
10274 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10275
784867a5
JK
102762011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10277
10278 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10279 Print new debug message for such case.
10280
6bf36717
JK
102812011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10282
10283 Fix overlapping memcpy.
10284 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10285 the read_inferior_memory transfer.
10286 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10287 write_inferior_memory transfer.
10288 (set_fast_tracepoint_jump): New variable buf. Use it for the
10289 read_inferior_memory and write_inferior_memory transfers.
10290 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10291 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10292 Use it for the write_inferior_memory transfer.
10293 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10294 buffers.
10295
50275556
MR
102962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10297
10298 * linux-low.c (fetch_register, store_register): Make code
10299 consistent, fix formatting.
10300
7325beb4
MR
103012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10302
10303 * linux-low.c (usr_store_inferior_registers): Factor out code
10304 to handle individual registers into...
10305 (store_register): ... this new function.
10306
c642a434
UW
103072011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10308
10309 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10310 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10311 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10312 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10313 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10314 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10315 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10316 (srv_xmlfiles): Add new XML files.
10317
10318 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10319 and <sys/uio.h>.
10320 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10321 (init_registers_s390_linux32v1): Add prototype.
10322 (init_registers_s390_linux32v2): Likewise.
10323 (init_registers_s390_linux64v1): Likewise.
10324 (init_registers_s390_linux64v2): Likewise.
10325 (init_registers_s390x_linux64v1): Likewise.
10326 (init_registers_s390x_linux64v2): Likewise.
10327 (s390_num_regs): Increment to 52.
10328 (s390_regmap): Add orig_r2 register.
10329 (s390_num_regs_3264): Increment to 68.
10330 (s390_regmap_3264): Add orig_r2 register.
10331 (s390_collect_ptrace_register): Handle orig_r2 register.
10332 (s390_supply_ptrace_register): Likewise.
10333 (s390_fill_last_break): New function.
10334 (s390_store_last_break): Likewise.
10335 (s390_fill_system_call): New function.
10336 (s390_store_system_call): Likewise.
10337 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10338 register sets.
10339 (s390_check_regset): New function.
10340 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10341 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10342 Update target_regsets for available register sets.
10343
2268b414
JK
103442011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10345 Jan Kratochvil <jan.kratochvil@redhat.com>
10346
10347 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10348 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10349 New.
10350 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10351 * linux-low.h (struct process_info_private): New member r_debug.
10352 * server.c (handle_qxfer_libraries): Call
10353 the_target->qxfer_libraries_svr4.
10354 (handle_qxfer_libraries_svr4): New function.
10355 (qxfer_packets): New entry "libraries-svr4".
10356 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10357 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10358 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10359 PACKET_qXfer_libraries_svr4.
10360
d6db1fab
UW
103612011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10362
10363 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10364 PSW address/mask between 8-byte and 16-byte formats.
10365 (s390_supply_ptrace_register): Likewise.
10366 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10367 basic addressing mode bit.
10368
242f5f1c
SS
103692011-11-24 Stan Shebs <stan@codesourcery.com>
10370
10371 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10372
f196051f
SS
103732011-11-17 Stan Shebs <stan@codesourcery.com>
10374
10375 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10376 (tracing_start_time): New global.
10377 (tracing_stop_time): New global.
10378 (tracing_user_name): New global.
10379 (tracing_notes): New global.
10380 (tracing_stop_note): New global.
10381 (cmd_qtstart): Set traceframe_usage, start_time.
10382 (stop_tracing): Set stop_time.
10383 (cmd_qtstatus): Report additional status.
10384 (cmd_qtp): New function.
10385 (handle_tracepoint_query): Call it.
10386 (cmd_qtnotes): New function.
10387 (handle_tracepoint_general_set): Call it.
10388 (get_timestamp): Rename from tsv_get_timestamp.
10389
405f8e94
SS
103902011-11-14 Stan Shebs <stan@codesourcery.com>
10391 Kwok Cheung Yeung <kcy@codesourcery.com>
10392
10393 * linux-x86-low.c (small_jump_insn): New.
10394 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10395 trampoline and error message, build a trampoline and issue a small
10396 jump instruction to it.
10397 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10398 trampoline and error message.
10399 (x86_get_min_fast_tracepoint_insn_len): New.
10400 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10401 * linux-low.h (struct linux_target_ops): Add arguments to
10402 install_fast_tracepoint_jump_pad operation, add new operation.
10403 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10404 arguments.
10405 (linux_get_min_fast_tracepoint_insn_len): New function.
10406 (linux_target_op): Add new operation.
10407 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10408 (gdb_trampoline_buffer_end): Ditto.
10409 (gdb_trampoline_buffer_error): Ditto.
10410 (struct ipa_sym_addresses): Add fields for new IPA variables.
10411 (symbol_list): Add entries for new IPA variables.
10412 (struct tracepoint): Add fields to hold the address range of the
10413 trampoline used by the tracepoint.
10414 (trampoline_buffer_head): New static variable.
10415 (trampoline_buffer_tail): Ditto.
10416 (claim_trampoline_space): New function.
10417 (have_fast_tracepoint_trampoline_buffer): New function.
10418 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10419 structure.
10420 (install_fast_tracepoint): Ditto, also add error buffer argument.
10421 (cmd_qtminftpilen): New function.
10422 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10423 (fast_tracepoint_from_trampoline_address): New function.
10424 (fast_tracepoint_collecting): Handle trampoline as part of jump
10425 pad space.
10426 (set_trampoline_buffer_space): New function.
10427 (initialize_tracepoint): Initialize new IPA variables.
10428 * target.h (struct target_ops): Add arguments to
10429 install_fast_tracepoint_jump_pad operation, add new
10430 get_min_fast_tracepoint_insn_len operation.
10431 (target_get_min_fast_tracepoint_insn_len): New.
10432 (install_fast_tracepoint_jump_pad): Add arguments.
10433 * server.h (IPA_BUFSIZ): Define.
10434 * linux-i386-ipa.c: Include extra header files.
10435 (initialize_fast_tracepoint_trampoline_buffer): New function.
10436 (initialize_low_tracepoint): Call it.
10437 * server.h (set_trampoline_buffer_space): Declare.
10438 (claim_trampoline_space): Ditto.
10439 (have_fast_tracepoint_trampoline_buffer): Ditto.
10440
1e4d1764
YQ
104412011-11-14 Yao Qi <yao@codesourcery.com>
10442
10443 * server.c (handle_query): Handle InstallInTrace for qSupported.
10444 * tracepoint.c (add_tracepoint): Sort list.
10445 (install_tracepoint, download_tracepoint): New.
10446 (cmd_qtdp): Call them to install and download tracepoints.
10447 (sort_tracepoints): Removed.
10448 (cmd_qtstart): Update.
10449
5c73ff4e
YQ
104502011-11-14 Yao Qi <yao@codesourcery.com>
10451
10452 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10453 * mem-break.h: Declare.
10454 * tracepoint.c (cmd_qtstart): Move some code to ...
10455 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10456 New.
10457 (download_tracepoints): Move some code to ...
10458 (download_tracepoint_1): ... here. New.
10459
86a30030
YQ
104602011-11-08 Yao Qi <yao@codesourcery.com>
10461
10462 * remote-utils.c (relocate_instruction): A comment fix.
10463
8d26e50c
JB
104642011-11-07 Joel Brobecker <brobecker@adacore.com>
10465
10466 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10467 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10468 dr_status_mirror and dr_control_mirror from debug_reg_state.
10469 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10470 (i386_initial_stuff): Remove use of deleted globals.
10471 (i386_get_thread_context, i386_set_thread_context,
10472 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10473 from debug_reg_state.
10474
a59306a3
YQ
104752011-11-05 Yao Qi <yao@codesourcery.com>
10476
10477 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10478 address as TPOINT's.
10479
3065dfb6
SS
104802011-11-02 Stan Shebs <stan@codesourcery.com>
10481
10482 * tracepoint.c (agent_mem_read_string): New function.
10483 (eval_agent_expr): Call it for tracenz.
10484 * server.c (handle_query): Report support for tracenz.
10485
fd0d8c7c
YQ
104862011-11-02 Yao Qi <yao@codesourcery.com>
10487
10488 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10489
609086b1
YQ
104902011-11-02 Yao Qi <yao@codesourcery.com>
10491
10492 * target.h: Fix a typo in comment.
10493
b9fd1791
PA
104942011-10-31 Pedro Alves <pedro@codesourcery.com>
10495
10496 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10497 clobber the breakpoints' shadows with fast tracepoint jumps.
10498 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10499 * target.c (write_inferior_memory): Also pass MYADDR down to
10500 check_mem_write.
10501
03583c20
UW
105022011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10503
10504 * configure.ac: Check support for personality routine.
10505 * configure: Regenerate.
10506 * config.in: Likewise.
10507 * linux-low.c: Include <sys/personality.h>.
10508 Define ADDR_NO_RANDOMIZE if necessary.
10509 (linux_create_inferior): Disable address space randomization when
10510 forking inferior, if requested.
10511 (linux_supports_disable_randomization): New function.
10512 (linux_target_ops): Install it.
10513 * server.h (disable_randomization): Declare.
10514 * server.c (disable_randomization): New global variable.
10515 (handle_general_set): Handle QDisableRandomization.
10516 (handle_query): Likewise for qSupported.
10517 (main): Support --disable-randomization and --no-disable-randomization
10518 command line arguments.
10519 * target.h (struct target_ops): Add supports_disable_randomization.
10520 (target_supports_disable_randomization): New macro.
10521
723b724b
MF
105222011-09-29 Mike Frysinger <vapier@gentoo.org>
10523
10524 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10525 ifdef check.
10526 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10527 [!PT_GETDSBT] (target_loadmap): New definition.
10528 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10529 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10530 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10531 and PT_GETDSBT to LINUX_LOADMAP.
10532 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10533 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10534
55329a5c 105352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10536
10537 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10538 (arm_linux_hwbp_cap): New static variable.
10539 (arm_linux_get_hwbp_cap): Replace by ...
10540 (arm_linux_init_hwbp_cap): ... this new function.
10541 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10542 (arm_linux_get_hw_watchpoint_count): Likewise.
10543 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10544 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10545 (arm_prepare_to_resume): Use perror_with_name instead of error.
10546
55329a5c 105472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10548
10549 * linux-arm-low.c: Include <signal.h>.
10550 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10551 (struct arm_linux_hwbp_cap): New data type.
10552 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10553 (struct arm_linux_hw_breakpoint): New data type.
10554 (MAX_BPTS, MAX_WPTS): Define.
10555 (struct arch_process_info, struct arch_lwp_info): New data types.
10556 (arm_linux_get_hwbp_cap): New function.
10557 (arm_linux_get_hw_breakpoint_count): Likewise.
10558 (arm_linux_get_hw_watchpoint_count): Likewise.
10559 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10560 (arm_hwbp_control_initialize): Likewise.
10561 (arm_hwbp_control_is_enabled): Likewise.
10562 (arm_hwbp_control_is_initialized): Likewise.
10563 (arm_hwbp_control_disable): Likewise.
10564 (arm_linux_hw_breakpoint_equal): Likewise.
10565 (arm_linux_hw_point_initialize): Likewise.
10566 (struct update_registers_data): New data structure.
10567 (update_registers_callback: New function.
10568 (arm_insert_point): Likewise.
10569 (arm_remove_point): Likewise.
10570 (arm_stopped_by_watchpoint): Likewise.
10571 (arm_stopped_data_address): Likewise.
10572 (arm_new_process): Likewise.
10573 (arm_new_thread): Likewise.
10574 (arm_prepare_to_resume): Likewise.
10575 (the_low_target): Register arm_insert_point, arm_remove_point,
10576 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10577 arm_new_thread, and arm_prepare_to_resume.
10578
6b9801d4
SS
105792011-09-15 Stan Shebs <stan@codesourcery.com>
10580
10581 * server.h (struct emit_ops): Add compare-goto fields.
10582 * tracepoint.c (gdb_agent_op_sizes): New table.
10583 (emit_eq_goto): New function.
10584 (emit_ne_goto): New function.
10585 (emit_lt_goto): New function.
10586 (emit_le_goto): New function.
10587 (emit_gt_goto): New function.
10588 (emit_ge_goto): New function.
10589 (is_goto_target): New function.
10590 (compile_bytecodes): Recognize special cases of compare-goto
10591 combinations and call specialized emitters for them.
10592 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10593 (amd64_emit_ne_goto): New function.
10594 (amd64_emit_lt_goto): New function.
10595 (amd64_emit_le_goto): New function.
10596 (amd64_emit_gt_goto): New function.
10597 (amd64_emit_ge_goto): New function.
10598 (amd64_emit_ops): Add the new functions.
10599 (i386_emit_eq_goto): New function.
10600 (i386_emit_ne_goto): New function.
10601 (i386_emit_lt_goto): New function.
10602 (i386_emit_le_goto): New function.
10603 (i386_emit_gt_goto): New function.
10604 (i386_emit_ge_goto): New function.
10605 (i386_emit_ops): Add the new functions.
10606
bf15cbda
SS
106072011-09-08 Stan Shebs <stan@codesourcery.com>
10608
10609 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10610 (i386_emit_epilogue): Restore %ebx.
10611
943ca1dd
JZ
106122011-08-31 Jie Zhang <jzhang918@gmail.com>
10613
10614 * server.c (step_thread): Remove definition.
10615 (process_serial_event): Don't handle Hs.
10616 * server.h (step_thread): Remove declaration.
10617 * target.c (set_desired_inferior): Remove use of step_thread.
10618
e3deef73
LM
106192011-08-24 Luis Machado <lgustavo@codesourcery.com>
10620
10621 * linux-low.c: Include linux-procfs.h.
10622 (linux_attach_lwp_1): Update comments.
10623 (linux_attach): Scan for existing threads when attaching to a
10624 process that is the tgid.
10625 * Makefile.in: Update dependencies.
10626
13da1c97
LM
106272011-08-24 Luis Machado <lgustavo@codesourcery.com>
10628
10629 * configure.srv: Add linux-procfs.o dependencies.
10630
881127c9
YQ
106312011-08-14 Yao Qi <yao@codesourcery.com>
10632
10633 * target.h (struct target_ops): Fix indent.
10634 * win32-low.c (win32_target_ops): Fix comment.
10635
58dbd541
YQ
106362011-08-14 Andrew Jenner <andrew@codesourcery.com>
10637 Yao Qi <yao@codesourcery.com>
10638
10639 * Makefile.in (clean): Remove tic6x-*.c files.
10640 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10641 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10642 (tic6x-c64xp-linux.c): Likewise.
10643 * configure.srv: Add support for tic6x-*-uclinux.
10644 * linux-tic6x-low.c: New.
10645 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10646
78d85199
YQ
106472011-08-14 Andrew Stubbs <ams@codesourcery.com>
10648 Yao Qi <yao@codesourcery.com>
10649
10650 * target.h (struct target_ops): Add read_loadmap.
10651 * linux-low.c (struct target_loadseg): New type.
10652 (struct target_loadmap): New type.
10653 (linux_read_loadmap): New function.
10654 (linux_target_ops): Add linux_read_loadmap.
10655 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10656 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10657 to NULL.
78d85199 10658
a959a88d
EZ
106592011-08-05 Eli Zaretskii <eliz@gnu.org>
10660
10661 * win32-low.c: Include <stdint.h>.
10662
1ced966e
PA
106632011-07-22 Pedro Alves <pedro@codesourcery.com>
10664
10665 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10666 to the inferior here.
10667 (i386_remove_aligned_watchpoint): Ditto.
10668 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10669 fit part of the watchpoint in the debug registers.
10670 (i386_update_inferior_debug_regs): New.
10671 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10672 registers, and only update the inferior on success.
10673 (i386_low_remove_watchpoint): Ditto.
10674
d26e3629
KY
106752011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10676
10677 * linux-low.c (compare_ints, unique, list_threads, show_process,
10678 linux_core_of_thread): Delete.
10679 (linux_target_ops): Change linux_core_of_thread to
10680 linux_common_core_of_thread.
10681 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10682 * utils.c (malloc_failure): Change type of argument.
10683 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10684 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10685 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10686 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10687 (IPA_OBJS): Add common-utils-ipa.o.
10688 (ptid_h, linux_osdata_h): New macros.
10689 (server_h): Add common/common-utils.h, common/xml-utils.h,
10690 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10691 common/ptid.h.
10692 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10693 ptid.o, buffer.o): New rules.
10694 (linux-low.o): Add common/linux-osdata.h as a dependency.
10695 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10696 * configure.ac: Add AC_HEADER_DIRENT check.
10697 * config.in: Regenerate.
10698 * configure: Regenerate.
10699 * remote-utils.c (xml_escape_text): Delete.
10700 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10701 buffer_xml_printf): Move to common/buffer.c.
10702 * server.c (main): Remove call to initialize_inferiors.
10703 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10704 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10705 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10706 internal_error, gdb_assert, gdb_assert_fail): Delete.
10707 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10708 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10709 common/buffer.h.
10710 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10711 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10712 initialize_inferiors): Delete.
10713
2275a1a7
PA
107142011-07-20 Pedro Alves <pedro@codesourcery.com>
10715
10716 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10717 symbol error.
10718
0a5b1e09
PA
107192011-05-31 Pedro Alves <pedro@codesourcery.com>
10720
10721 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10722 assertion.
10723 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10724
6938fd34
YQ
107252011-05-26 Yao Qi <yao@codesourcery.com>
10726
10727 * Makefile.in (thread-db.o): Track dependence to
10728 common/gdb_thread_db.h.
10729 * thread-db.c: include gdb_thread_db.h from right place.
10730
b481f9e0
TT
107312011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10732
10733 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10734 __FILE__ and __LINE__ to internal_error.
10735
98a5dd13
DE
107362011-05-13 Doug Evans <dje@google.com>
10737
10738 * thread-db.c (try_thread_db_load_from_sdir): New function.
10739 (try_thread_db_load_from_dir): New function.
10740 (thread_db_load_search): Handle $sdir, ignore $pdir.
10741 Remove trying of system directories if search of
10742 libthread-db-search-path fails, that is now done via $sdir.
10743
d248b706
KY
107442011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10745
10746 * server.c (handle_query): Add EnableDisableTracepoints to the list
10747 of supported features.
43aaf8b6 10748 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10749 tracepoints.
43aaf8b6
PA
10750 (cmd_qtenable_disable): New.
10751 (cmd_qtstart): Install tracepoints even if disabled.
10752 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10753 receiving a QTEnable or QTDisable packet.
10754 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10755 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10756 tracepoints.
10757 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10758
84e578fb
DE
107592011-05-10 Doug Evans <dje@google.com>
10760
10761 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10762
71f55dd8
DE
107632011-05-04 Doug Evans <dje@google.com>
10764
10765 * linux-low.c (linux_join): Skip process lookup.
10766 * spu-low.c (spu_join): Ditto.
10767 * server.c (join_inferiors_callback): Delete.
10768 (process_serial_event): For 'D' packet (detach) call join_inferior
10769 directly.
10770
4d393d60
JM
107712011-05-04 Joseph Myers <joseph@codesourcery.com>
10772
10773 * README: Don't mention xscale*-*-linux*.
10774 * configure.srv (xscale*-*-linux*): Don't handle target.
10775
b00ad6ff
NF
107762011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10777
10778 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10779 casting pointers.
10780 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10781 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10782 (i386_emit_void_call_2): Likewise.
10783
af96c192
YQ
107842011-04-26 Yao Qi <yao@codesourcery.com>
10785
43aaf8b6
PA
10786 * linux-low.c: Move common macros to linux-ptrace.h.
10787 Include linux-ptrace.h.
af96c192
YQ
10788 * Makefile.in (linux_ptrace_h): New.
10789 (linux-low.o): Depends on linux-ptrace.h.
10790
03f2bd59
JK
107912011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10792
10793 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10794 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10795 (remote_prepare): New function with most of the TCP code from ...
10796 (remote_open): ... here. Detect PORT here unconditionally. Move also
10797 setting transport_is_reliable.
10798 * server.c (run_once): New variable.
10799 (gdbserver_usage): Document it.
10800 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10801 the first run if RUN_ONCE.
10802 * server.h (run_once, remote_prepare): New declarations.
10803
7a9dd1b2
TT
108042011-04-19 Tom Tromey <tromey@redhat.com>
10805
10806 * win32-low.c (handle_load_dll): Remove duplicate "the".
10807
81239425
PM
108082011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10809
10810 Remove support for old Cygwin 1.5 versions.
10811 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10812 function to avoid warning.
10813 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10814 warning.
10815
9e0627f1
PM
108162011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10817
10818 * gdbserver/server.h (Macro _): Define it if not available.
10819
588eebee
MS
108202011-03-14 Michael Snyder <msnyder@vmware.com>
10821
348af9f7 10822 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10823
43f70d4c
JB
108242011-03-10 Joel Brobecker <brobecker@adacore.com>
10825
10826 * Makefile.in (maintainer-clean realclean distclean): Remove
10827 "make ... subdir_do" command.
10828
348af9f7
MS
108292011-03-10 Michael Snyder <msnyder@vmware.com>
10830
10831 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10832
10833 * server.c (handle_v_run): Free alloced buffer on early return.
10834
e637a4f5
YQ
108352011-03-09 Yao Qi <yao@codesourcery.com>
10836
10837 Revert:
10838 2011-03-04 Yao Qi <yao@codesourcery.com>
10839
10840 * Makefile.in: Remove GNU make feature --directory.
10841
10842 2011-03-05 Yao Qi <yao@codesourcery.com>
10843
10844 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10845 (subdir_do): New make target. Copied from gdb/Makefile.
10846 (maintainer-clean, realclean, distclean, clean): Call corresponding
10847 make targets in common/Makefile.
10848
10849 2011-02-11 Yao Qi <yao@codesourcery.com>
10850
10851 * configure.ac: Call AC_PROG_RANLIB.
10852 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10853 * configure: Regenerate.
10854
e6edda56
JK
108552011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10856
10857 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10858
e5141119
JB
108592011-03-06 Yao Qi <yao@codesourcery.com>
10860
10861 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10862
64794aa4
JB
108632011-03-05 Yao Qi <yao@codesourcery.com>
10864
10865 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10866 (subdir_do): New make target. Copied from gdb/Makefile.
10867 (maintainer-clean, realclean, distclean, clean): Call corresponding
10868 make targets in common/Makefile.
10869
7a762829
YQ
108702011-03-04 Yao Qi <yao@codesourcery.com>
10871
10872 * Makefile.in: Remove GNU make feature --directory.
10873
348af9f7
MS
108742011-03-04 Michael Snyder <msnyder@vmware.com>
10875
10876 * server.c (queue_stop_reply): Call xmalloc not malloc.
10877
108782011-03-02 Michael Snyder <msnyder@vmware.com>
10879
10880 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10881
9f72fee2
MS
108822011-02-28 Michael Snyder <msnyder@vmware.com>
10883
588eebee
MS
10884 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10885 (cmd_qtframe): Ditto.
10886 (cmd_qtbuffer): Ditto.
10887 (cmd_bigqtbuffer): Ditto.
10888
9f72fee2
MS
10889 * utils.c (decimal2str): Initialize 'width' to nine, then
10890 don't mess with it.
10891
8040bd49
UW
108922011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10893
10894 * hostio.c (require_data): Free *data, not data.
10895
7e52cbd0
JK
108962011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10897
10898 * hostio.c (require_data): Use free, not xfree.
10899
9130f83e
MS
109002011-02-27 Michael Snyder <msnyder@vmware.com>
10901
4b812f4e
MS
10902 * server.c (handle_query): Discard unused value.
10903
9130f83e
MS
10904 * hostio.c (require_data): Free malloc memory before returning
10905 error.
10906
69d37113
MS
109072011-02-26 Michael Snyder <msnyder@vmware.com>
10908
10909 * linux-low.c (list_threads): Call closedir for dirent.
10910
35f5825a
MS
109112011-02-27 Michael Snyder <msnyder@vmware.com>
10912
2a589cef
MS
10913 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10914 a case statement falls through.
10915
0adea5f7
MS
10916 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10917
35f5825a
MS
10918 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10919 in comparison.
10920
238f1c74
MS
109212011-02-26 Michael Snyder <msnyder@vmware.com>
10922
10923 * utils.c (decimal2str): Eliminate dead code and dead param.
10924 (pulongest): Drop dead param from call to decimal2str.
10925 (plongest): Ditto.
10926
633ff500
JB
109272011-02-24 Joel Brobecker <brobecker@adacore.com>
10928
10929 Revert the following patch (not approved yet):
10930 2011-02-21 Hui Zhu <teawater@gmail.com>
10931 * tracepoint.c (tp_printf): New function.
10932 (eval_agent_expr): Handle gdb_agent_op_printf.
10933
f9c6ff72
HZ
109342011-02-21 Hui Zhu <teawater@gmail.com>
10935
10936 * tracepoint.c (tp_printf): New function.
10937 (eval_agent_expr): Handle gdb_agent_op_printf.
10938
94d5e490
TT
109392011-02-18 Tom Tromey <tromey@redhat.com>
10940
10941 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10942 (tracepoint.o): Likewise.
10943 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10944 (gdb_agent_op_names): Likewise.
10945
c7f96d2b
TT
109462011-02-18 Tom Tromey <tromey@redhat.com>
10947
10948 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10949 gdb_agent_op_rot>: New constants.
10950 (gdb_agent_op_names): Add pick and roll.
10951 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10952 cases.
10953
0feedb2c
JK
109542011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10955
10956 * aclocal.m4: Regenerated with aclocal-1.11.1.
10957
b3b9301e
PA
109582011-02-14 Pedro Alves <pedro@codesourcery.com>
10959
10960 * server.c (handle_qxfer_traceframe_info): New.
10961 (qxfer_packets): Register "traceframe-info".
10962 (handle_query): Report support for qXfer:traceframe-info:read+.
10963 * tracepoint.c (match_blocktype): New.
10964 (traceframe_find_block_type): Rename to ...
10965 (traceframe_walk_blocks): ... this. Add callback filter argument,
10966 and use it.
10967 (traceframe_find_block_type): New, reimplemented on top of
10968 traceframe_walk_blocks.
10969 (build_traceframe_info_xml): New.
10970 (traceframe_read_info): New.
10971 * server.h (traceframe_read_info): Declare.
10972
4f3e6fb7
YQ
109732011-02-11 Yao Qi <yao@codesourcery.com>
10974
10975 * configure.ac: Call AC_PROG_RANLIB.
10976 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10977 * configure: Regenerate.
10978
764880b7
PA
109792011-02-07 Pedro Alves <pedro@codesourcery.com>
10980
10981 * server.c (gdb_read_memory): Change return semantics to allow
10982 partial transfers.
10983 (handle_search_memory_1): Adjust.
10984 (process_serial_event) <'m' packet>: Handle partial transfers.
10985 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10986
1c79eb8a
PA
109872011-01-28 Pedro Alves <pedro@codesourcery.com>
10988
10989 * regcache.c (init_register_cache): Initialize
10990 regcache->register_status.
10991 (free_register_cache): Release regcache->register_status.
10992 (regcache_cpy): Copy register_status.
10993 (registers_to_string): Print 'x's for unavailable registers.
10994 (supply_register): Mark the register's status valid or
10995 unavailable, depending on whether a buffer was passed in or not.
10996 (supply_register_zeroed): New.
10997 (supply_regblock): Mark the registers' status valid or
10998 unavailable, depending on whether a buffer was passed in or not.
10999 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11000 (struct regcache): New `register_status' field.
11001 (supply_register_zeroed): Declare.
11002 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11003 supply_register_zeroed, rather than passing a NULL buffer to
11004 supply_register.
11005 * tracepoint.c (fetch_traceframe_registers): Update comment.
11006
85724a0e
PA
110072011-01-28 Pedro Alves <pedro@codesourcery.com>
11008
11009 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11010 buffer explicit.
11011
d08aafef
PA
110122011-01-25 Pedro Alves <pedro@codesourcery.com>
11013
11014 * server.h (decode_xfer_write): Change prototype.
11015 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11016 and don't extract the annex here.
11017 * server.c (decode_xfer_read): Remove `annex' parameter,
11018 and don't extract the annex here.
11019 (decode_xfer): New.
11020 (struct qxfer): New.
11021 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11022 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11023 (handle_qxfer_statictrace): New functions, abstracted out from
11024 handle_query, and made to use the struct qxfer interface.
11025 (handle_threads_qxfer_proper): Rename to ...
11026 (handle_qxfer_threads_proper): ... this.
11027 (handle_threads_qxfer): Rename to ...
11028 (handle_qxfer_threads): ... this. Adjust.
11029 (qxfer_packets): New array.
11030 (handle_qxfer): New function.
11031 (handle_query): Use handle_qxfer.
11032
493e2a69
MS
110332011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11034
11035 * gdbreplay.c: Shorten lines of >= 80 columns.
11036 * linux-low.c: Ditto.
11037 * linux-ppc-low.c: Ditto.
11038 * linux-s390-low.c: Ditto.
11039 * linux-sparc-low.c: Ditto.
11040 * linux-x86-low.c: Ditto.
11041 * linux-xtensa-low.c: Ditto.
11042 * mem-break.c: Ditto.
11043 * nto-low.c: Ditto.
11044 * regcache.h: Ditto.
11045 * remote-utils.c: Ditto.
11046 * server.c: Ditto.
11047 * server.h: Ditto.
11048 * thread-db.c: Ditto.
11049 * tracepoint.c: Ditto.
11050 * utils.c: Ditto.
11051 * win32-low.h: Ditto.
11052
44944448
JB
110532011-01-05 Joel Brobecker <brobecker@adacore.com>
11054
11055 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11056 update.
11057
71ce852c
JB
110582011-01-01 Joel Brobecker <brobecker@adacore.com>
11059
11060 * server.c (gdbserver_version): Update copyright year in version
11061 output.
11062 * gdbreplay.c (gdbreplay_version): Ditto.
11063
eb826dc6
MF
110642010-12-29 Jie Zhang <jie.zhang@analog.com>
11065
11066 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11067 * linux-bfin-low.c: New file.
11068 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11069 PT_DATA_ADDR for BFIN targets.
11070 * Makefile.in (SFILES): Add linux-bfin-low.c.
11071 (clean): Remove reg-bfin.c.
11072 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11073 * README: Mention supported Blackfin targets.
11074
39ab222a
MF
110752010-12-23 Mike Frysinger <vapier@gentoo.org>
11076
11077 * .gitignore: New file.
11078
a1f2ce7d
MF
110792010-11-16 Mike Frysinger <vapier@gentoo.org>
11080
11081 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11082
f474844c
JZ
110832010-10-22 Jie Zhang <jie@codesourcery.com>
11084
11085 * Makefile.in: Add FLAGS_TO_PASS variable.
11086 (install): Remove dependency of install-only and recursively
11087 invoke make for install-only.
11088
f1048712
DE
110892010-10-04 Doug Evans <dje@google.com>
11090
11091 * Makefile.in (uninstall): Use $(DESTDIR).
11092
b53a1623
PA
110932010-09-24 Pedro Alves <pedro@codesourcery.com>
11094
e6ee044d
PA
11095 PR gdb/11842
11096
b53a1623
PA
11097 * linux-x86-low.c (compat_siginfo_from_siginfo)
11098 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11099 si_code is < 0. Check for si_code == SI_TIMER before checking for
11100 si_code < 0.
11101
fa1bd1e4
JB
111022010-09-13 Joel Brobecker <brobecker@adacore.com>
11103
11104 * lynx-i386-low.c: New file.
11105 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11106
47fac8f8
JB
111072010-09-13 Joel Brobecker <brobecker@adacore.com>
11108
11109 * lynx-low.c (ptrace_request_to_str): Remove handling for
11110 request values that have been removed in LynxOS 5.x.
11111
1adfc54d
JB
111122010-09-13 Joel Brobecker <brobecker@adacore.com>
11113
11114 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11115 <ptrace.h>
11116
c2a66c29
NS
111172010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11118
11119 * configure.ac: Add --enable-inprocess-agent option.
11120 * configure: Rebuilt.
11121
32fcada3
YQ
111222010-09-06 Yao Qi <yao@codesourcery.com>
11123
11124 * linux-low.c (linux_kill): Remove unused variable.
11125 (linux_stabilize_threads): Likewise.
11126 * server.c (start_inferior): Likewise.
11127 (queue_stop_reply_callback): Likewise.
11128 * tracepoint.c (do_action_at_tracepoint): Likewise.
11129
0cccb683
YQ
111302010-09-06 Yao Qi <yao@codesourcery.com>
11131
11132 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11133 on return.
11134
423ec54c
JK
111352010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11136
11137 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11138
12ac6819
PA
111392010-09-06 Pedro Alves <pedro@codesourcery.com>
11140
11141 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11142 "$(IPA_DEPFILES)".
11143
8ed54b31
JB
111442010-09-01 Joel Brobecker <brobecker@adacore.com>
11145
11146 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11147 gdbserver/lynx-ppc-low.c: New files.
11148 * Makefile.in (lynx_low_h): New variable.
11149 (lynx-low.o, lynx-ppc-low.o): New rules.
11150 * configure.ac: On LynxOS, link with -lnetinet.
11151 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11152 * configure: regenerate.
11153
bb0116a4
JB
111542010-09-01 Joel Brobecker <brobecker@adacore.com>
11155
11156 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11157 * configure.ac: Add check for vasprintf and vsnprintf.
11158 * configure, config.in: Regenerate.
11159 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11160
a778ab81 111612010-09-01 Joel Brobecker <brobecker@adacore.com>
11162
11163 * gdbreplay.c: Move include of alloca.h up, next to include of
11164 malloc.h.
11165 * server.h: Add include of malloc.h.
11166 * mem-break.c: Remove include of malloc.h.
11167 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11168
8b034a19 111692010-09-01 Joel Brobecker <brobecker@adacore.com>
11170
11171 * Makefile.in (memmem.o): Build with -Wno-error.
11172
111732010-09-01 Joel Brobecker <brobecker@adacore.com>
11174
11175 * utils.c (xsnprintf): Make non-static.
11176 * server.h: Add xsnprintf declaration.
11177 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11178 replace calls to snprintf by calls to xsnprintf throughout.
11179
111802010-09-01 Joel Brobecker <brobecker@adacore.com>
11181
11182 * configure.ac: Add configure check for alloca.
11183 * configure, config.in: Regenerate.
11184 * server.h: Include alloca.h if it exists.
11185 * gdbreplay.c: Include alloca.h if it exists.
11186
1a981360
PA
111872010-08-28 Pedro Alves <pedro@codesourcery.com>
11188
11189 * linux-low.c (__SIGRTMIN): Define if not already defined.
11190 (linux_create_inferior): Check for __ANDROID__ rather than
11191 __SIGRTMIN.
11192 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11193 are already deferred.
11194 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11195 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11196 stopped and already has a pending signal to report.
11197 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11198 a pending signal to report or is moving out of a jump pad.
11199 (linux_init_signals): Check for __ANDROID__ rather than
11200 __SIGRTMIN.
11201
b4d51a55
PA
112022010-08-28 Pedro Alves <pedro@codesourcery.com>
11203
11204 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11205 debug_threads check. Avoid a linear search when not doing debug
11206 output.
11207
ec48365d
PA
112082010-08-27 Pedro Alves <pedro@codesourcery.com>
11209
11210 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11211 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11212 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11213 (process_event): Change local fd's type to gdb_fildes_t.
11214 (create_file_handler): Adjust prototype.
11215 (delete_file_handler): Adjust prototype.
11216 (handle_file_event): Adjust prototype. Use pfildes.
11217 (create_file_event): Adjsut prototype.
11218 * remote-utils.c (remote_desc, listen_desc): Change type to
11219 gdb_fildes_t.
11220 * server.h: New gdb_fildes_t typedef.
11221 [USE_WIN32API]: Include winsock2.h.
11222 (delete_file_handler, add_file_handler): Adjust prototypes.
11223 (pfildes): Declare.
11224 * utils.c (pfildes): New.
11225
854d88f0
PA
112262010-08-27 Pedro Alves <pedro@codesourcery.com>
11227
11228 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11229 * configure: Regenerate.
11230
0146f85b
PA
112312010-08-27 Pedro Alves <pedro@codesourcery.com>
11232
11233 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11234 (linux_done_accessing_memory): ... this.
11235 (linux_target_ops): Adjust.
11236 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11237 * nto-low.c (nto_target_ops): Adjust comment.
11238 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11239 * spu-low.c (spu_target_ops): Adjust comment.
11240 * target.h (target_ops): Rename unprepare_to_access_memory field
11241 to done_accessing_memory.
11242 (unprepare_to_access_memory): Rename to ...
11243 (done_accessing_memory): ... this.
11244
90d74c30
PA
112452010-08-26 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.c (linux_prepare_to_access_memory): New.
11248 (linux_unprepare_to_access_memory): New.
11249 (linux_target_ops): Install them.
11250 * server.c (read_memory): Rename to ...
11251 (gdb_read_memory): ... this. Use
11252 prepare_to_access_memory/prepare_to_access_memory.
11253 (write_memory): Rename to ...
11254 (gdb_write_memory): ... this. Use
11255 prepare_to_access_memory/prepare_to_access_memory.
11256 (handle_search_memory_1): Adjust.
11257 (process_serial_event): Adjust.
11258 * target.h (struct target_ops): New fields
11259 prepare_to_access_memory and unprepare_to_access_memory.
11260 (prepare_to_access_memory, unprepare_to_access_memory): New.
11261 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11262 prepare_to_access_memory/prepare_to_access_memory.
11263 * nto-low.c (nto_target_ops): Adjust.
11264 * spu-low.c (spu_target_ops): Adjust.
11265 * win32-low.c (win32_target_ops): Adjust.
11266
fd467969
PA
112672010-08-26 Pedro Alves <pedro@codesourcery.com>
11268
11269 * Makefile.in (WARN_CFLAGS): Get it from configure.
11270 (WERROR_CFLAGS): New.
11271 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11272 * configure.ac: Introduce --enable-werror, which adds -Werror to
11273 the compiler command line. Enabled by default. Disable with
11274 --disable-werror. Add -Wdeclaration-after-statement
11275 Wpointer-arith and -Wformat-nonliteral to warning flags.
11276 * configure: Regenerate.
11277
331e2f5f
PA
112782010-08-26 Pedro Alves <pedro@codesourcery.com>
11279
11280 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11281
e581f2b4
PA
112822010-08-26 Pedro Alves <pedro@codesourcery.com>
11283
11284 * gdbreplay.c (remote_error): New.
11285 (gdbchar): New.
11286 (expect): Use gdbchar. Check for error reading from GDB.
11287 Clarify sync error output.
11288 (play): Check for errors writing to GDB.
11289 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11290 * remote-utils.c (getpkt): Check for errors writing to the remote
11291 descriptor.
11292
3c11dd79
PA
112932010-08-25 Pedro Alves <pedro@codesourcery.com>
11294
11295 * linux-low.c (linux_wait_1): Move non-debugging code out of
11296 `debug_threads' control.
11297
d20a8ad9
PA
112982010-08-25 Pedro Alves <pedro@codesourcery.com>
11299
11300 * linux-low.c (linux_wait_1): Don't set last_status here.
11301 * server.c (push_event, queue_stop_reply_callback): Assert we're
11302 not pushing a TARGET_WAITKIND_IGNORE event.
11303 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11304 (myresume, handle_target_event): Set the thread's last_resume_kind
11305 and last_status from the target returned status.
11306
964e4306
PA
113072010-08-25 Pedro Alves <pedro@codesourcery.com>
11308
11309 PR threads/10729
11310
11311 * linux-x86-low.c (update_debug_registers_callback): New.
11312 (i386_dr_low_set_addr): Use it.
11313 (i386_dr_low_get_addr): New.
11314 (i386_dr_low_set_control): Use update_debug_registers_callback.
11315 (i386_dr_low_get_control): New.
11316 (i386_dr_low_get_status): Adjust.
11317 * linux-low.c (linux_stop_lwp): New.
11318 * linux-low.h (linux_stop_lwp): Declare.
11319
11320 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11321 argument instead of a i386_debug_reg_state.
11322 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11323 a i386_debug_reg_state.
11324 (i386_insert_aligned_watchpoint): Adjust.
11325 (i386_remove_aligned_watchpoint): Adjust.
11326 (i386_low_stopped_data_address): Read the debug registers from the
11327 inferior instead of from the mirrors.
11328 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11329 (i386_dr_low_get_addr): Declare.
11330 (i386_dr_low_get_control): Declare.
11331 (i386_dr_low_get_status): Change prototype.
11332
11333 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11334 (i386_dr_low_get_addr): New.
11335 (i386_dr_low_get_control): New.
11336 (i386_dr_low_get_status): Adjust prototype. Return
11337 dr_status_mirror.
11338 (i386_initial_stuff): Clear dr_status_mirror and
11339 dr_control_mirror.
11340 (i386_get_thread_context): Adjust.
11341 (i386_set_thread_context): Adjust.
11342 (i386_thread_added): Adjust.
11343
5f21a75b
PA
113442010-08-24 Pedro Alves <pedro@codesourcery.com>
11345
11346 * linux-low.h (linux_thread_area): Delete declaration.
11347
3e4c1235
TS
113482010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11349
11350 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11351 after its termination.
11352
1971b033
PA
113532010-08-09 Pedro Alves <pedro@codesourcery.com>
11354
11355 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11356 (gdb_wants_all_stopped): Delete.
11357 (linux_wait_1): Don't call them.
11358 * server.c (handle_v_cont): Tag all threads as want-stopped.
11359 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11360 stopped as "client-wants-stopped".
11361
310444ac
PA
113622010-07-31 Pedro Alves <pedro@codesourcery.com>
11363
11364 * Makefile.in (signals_h): New.
11365 (server_h): Depend on it.
11366 (server.o): Don't depend on $(signals_def).
11367 (signals.o): Depend on $(signals_def).
11368
a19cae16
JK
113692010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11370
11371 * Makefile.in (signals_def): New.
11372 (server_h): Append include/gdb/signals.h and signals_def.
11373 (server.o): Append signals_def.
11374
30d50328
JK
113752010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11376
11377 * server.c (handle_target_event): Use target_signal_to_host for
11378 resume_info.sig initialization.
11379 * target.h (struct thread_resume) <sig>: New comment.
11380
5c3216e2
OS
113812010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11382
c6f46ca0
OS
11383 * server.c (handle_query): strcpy() the returned string from paddress()
11384 instead of sprintf().
5c3216e2
OS
11385 * utils.c (paddress): Return phex_nz().
11386
6bd31874
JB
113872010-07-07 Joel Brobecker <brobecker@adacore.com>
11388
11389 * server.c (handle_v_cont): Call mourn_inferior if process
11390 just exited.
11391 (myresume): Likewise.
11392
0fb4aa4b
PA
113932010-07-01 Pedro Alves <pedro@codesourcery.com>
11394
11395 Static tracepoints, and integration with UST.
11396
11397 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11398 * mem-break.c (uninsert_all_breakpoints)
11399 (reinsert_all_breakpoints): New.
11400 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11401 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11402 (gdb_agent_ust_loaded, helper_thread_id)
11403 (gdb_agent_helper_thread_id): New macros.
11404 (struct ipa_sym_addresses): Add addr_ust_loaded,
11405 addr_helper_thread_id, addr_cmd_buf.
11406 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11407 (in_process_agent_loaded_ust): New.
11408 (write_e_ust_not_loaded): New.
11409 (maybe_write_ipa_ust_not_loaded): New.
11410 (struct collect_static_trace_data_action): New.
11411 (enum tracepoint_type) <static_tracepoint>: New.
11412 (struct tracepoint) <handle>: Mention static tracepoints.
11413 (struct static_tracepoint_ctx): New.
11414 (CMD_BUF_SIZE): New.
11415 (add_tracepoint_action): Handle static tracepoint actions.
11416 (unprobe_marker_at): New.
11417 (clear_installed_tracepoints): Handle static tracepoints.
11418 (cmd_qtdp): Handle static tracepoints.
11419 (probe_marker_at): New.
11420 (cmd_qtstart): Handle static tracepoints.
11421 (response_tracepoint): Handle static tracepoints.
11422 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11423 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11424 (get_context_regcache): Handle static tracepoints.
11425 (do_action_at_tracepoint): Handle static tracepoint actions.
11426 (traceframe_find_block_type): Handle static trace data blocks.
11427 (traceframe_read_sdata): New.
11428 (download_tracepoints): Download static tracepoint actions.
11429 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11430 (GDB_PROBE_NAME): New.
11431 (ust_ops): New.
11432 (GET_UST_SYM): New.
11433 (USTF): New.
11434 (dlsym_ust): New.
11435 (ust_marker_to_static_tracepoint): New.
11436 (gdb_probe): New.
11437 (collect_ust_data_at_tracepoint): New.
11438 (gdb_ust_probe): New.
11439 (UNIX_PATH_MAX, SOCK_DIR): New.
11440 (gdb_ust_connect_sync_socket): New.
11441 (resume_thread, stop_thread): New.
11442 (run_inferior_command): New.
11443 (init_named_socket): New.
11444 (gdb_ust_socket_init): New.
11445 (cstr_to_hexstr): New.
11446 (next_st): New.
11447 (first_marker, next_marker): New.
11448 (response_ust_marker): New.
11449 (cmd_qtfstm, cmd_qtsstm): New.
11450 (unprobe_marker_at, probe_marker_at): New.
11451 (cmd_qtstmat, gdb_ust_thread): New.
11452 (gdb_ust_init): New.
11453 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11454 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11455 (ST_REGENTRY): New.
11456 (x86_64_st_collect_regmap): New.
11457 (X86_64_NUM_ST_COLLECT_GREGS): New.
11458 (AMD64_RIP_REGNUM): New.
11459 (supply_static_tracepoint_registers): New.
11460 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11461 (ST_REGENTRY): New.
11462 (i386_st_collect_regmap): New.
11463 (i386_NUM_ST_COLLECT_GREGS): New.
11464 (supply_static_tracepoint_registers): New.
11465 * server.c (handle_query): Handle qXfer:statictrace:read.
11466 <qSupported>: Report support for StaticTracepoints, and
11467 qXfer:statictrace:read features.
11468 * server.h (traceframe_read_sdata)
11469 (supply_static_tracepoint_registers): Declare.
11470 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11471 (unpack_varlen_hex): Include in IPA build.
11472 * Makefile.in (ustlibs, ustinc): New.
11473 (IPA_OBJS): Add remote-utils-ipa.o.
11474 ($(IPA_LIB)): Link -ldl and -lpthread.
11475 (UST_CFLAGS): New.
11476 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11477 * config.in, configure: Regenerate.
11478
9e4344e5
PA
114792010-06-20 Ian Lance Taylor <iant@google.com>
11480 Pedro Alves <pedro@codesourcery.com>
11481
11482 * linux-x86-low.c (always_true): Delete.
11483 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11484 trying to fool the compiler with always_true.
11485
c6beb2cb
PA
114862010-06-20 Pedro Alves <pedro@codesourcery.com>
11487
11488 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11489 conditions in gdbserver.
11490
d2ed6730
UW
114912010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11492
11493 * spu-low.c (spu_read_memory): Wrap around local store limit.
11494 (spu_write_memory): Likewise.
11495
4e29fb54
PA
114962010-06-15 Pedro Alves <pedro@codesourcery.com>
11497
11498 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11499 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11500 LONGEST uses.
11501 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11502 uses.
11503 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11504 uses with LONGEST uses.
11505
6a271cae
PA
115062010-06-14 Stan Shebs <stan@codesourcery.com>
11507 Pedro Alves <pedro@codesourcery.com>
11508
11509 Bytecode compiler.
11510
11511 * linux-x86-low.c: Include limits.h.
11512 (add_insns): New.
11513 (always_true): New.
11514 (EMIT_ASM): New.
11515 (EMIT_ASM32): New.
11516 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11517 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11518 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11519 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11520 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11521 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11522 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11523 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11524 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11525 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11526 (amd64_emit_void_call_2): New.
11527 (amd64_emit_ops): New.
11528 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11529 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11530 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11531 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11532 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11533 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11534 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11535 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11536 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11537 (i386_emit_stack_adjust, i386_emit_int_call_1)
11538 (i386_emit_void_call_2): New.
11539 (i386_emit_ops): New.
11540 (x86_emit_ops): New.
11541 (the_low_target): Install x86_emit_ops.
11542 * server.h (struct emit_ops): New.
11543 (get_raw_reg_func_addr): Declare.
11544 (current_insn_ptr, emit_error): Declare.
11545 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11546 (set_trace_state_variable_value): New defines.
11547 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11548 addr_get_trace_state_variable_value and
11549 addr_set_trace_state_variable_value.
11550 (symbol_list): New fields for get_raw_reg,
11551 get_trace_state_variable_value and set_trace_state_variable_value.
11552 (condfn): New typedef.
11553 (struct tracepoint): New field `compiled_cond'.
11554 (do_action_at_tracepoint): Clear compiled_cond.
11555 (get_trace_state_variable_value, set_trace_state_variable_value):
11556 Export in the IPA.
11557 (condition_true_at_tracepoint): If there's a compiled condition,
11558 run that.
11559 (current_insn_ptr, emit_error): New globals.
11560 (struct bytecode_address): New.
11561 (get_raw_reg_func_addr): New.
11562 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11563 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11564 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11565 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11566 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11567 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11568 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11569 (compile_tracepoint_condition, compile_bytecodes): New.
11570 * target.h (emit_ops): Forward declare.
11571 (struct target_ops): New field emit_ops.
11572 (target_emit_ops): New.
11573 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11574 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11575 * linux-low.c (linux_emit_ops): New.
11576 (linux_target_ops): Install it.
11577 * linux-low.h (struct linux_target_ops): New field emit_ops.
11578
92b72907
UW
115792010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11580
11581 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11582 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11583
fa593d66
PA
115842010-06-01 Pedro Alves <pedro@codesourcery.com>
11585 Stan Shebs <stan@codesourcery.com>
11586
11587 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11588 (all): Depend on $(extra_libraries).
11589 (install-only): Install the IPA.
11590 (IPA_OBJS, IPA_LIB): New.
11591 (clean): Remove the IPA lib.
11592 (IPAGENT_CFLAGS): New.
11593 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11594 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11595 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11596 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11597 * configure.ac: Check for atomic builtins support in the compiler.
11598 (IPA_DEPFILES, extra_libraries): Define.
11599 * configure.srv (ipa_obj): Add description.
11600 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11601 (i[34567]86-*-linux*): Set ipa_obj.
11602 (x86_64-*-linux*): Set ipa_obj.
11603 * linux-low.c (stabilizing_threads): New.
11604 (supports_fast_tracepoints): New.
11605 (linux_detach): Stabilize threads before detaching.
11606 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11607 the lwp is either not stabilizing, or is moving out of a jump pad.
11608 (linux_fast_tracepoint_collecting): New.
11609 (maybe_move_out_of_jump_pad): New.
11610 (enqueue_one_deferred_signal): New.
11611 (dequeue_one_deferred_signal): New.
11612 (linux_wait_for_event_1): If moving out of a jump pad, defer
11613 pending signals to later.
11614 (linux_stabilize_threads): New.
11615 (linux_wait_1): Check if threads need moving out of jump pads, and
11616 do it if so.
11617 (stuck_in_jump_pad_callback): New.
11618 (move_out_of_jump_pad_callback): New.
11619 (lwp_running): New.
11620 (linux_resume_one_lwp): Handle moving out of jump pads.
11621 (linux_set_resume_request): Dequeue deferred signals.
11622 (need_step_over_p): Also step over fast tracepoint jumps.
11623 (start_step_over): Also uninsert fast tracepoint jumps.
11624 (finish_step_over): Also reinsert fast tracepoint jumps.
11625 (linux_install_fast_tracepoint_jump): New.
11626 (linux_target_ops): Install linux_stabilize_threads and
11627 linux_install_fast_tracepoint_jump_pad.
11628 * linux-low.h (linux_target_ops) <get_thread_area,
11629 install_fast_tracepoint_jump_pad>: New fields.
11630 (struct lwp_info) <collecting_fast_tracepoint,
11631 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11632 (linux_get_thread_area): Declare.
11633 * linux-x86-low.c (jump_insn): New.
11634 (x86_get_thread_area): New.
11635 (append_insns): New.
11636 (push_opcode): New.
11637 (amd64_install_fast_tracepoint_jump_pad): New.
11638 (i386_install_fast_tracepoint_jump_pad): New.
11639 (x86_install_fast_tracepoint_jump_pad): New.
11640 (the_low_target): Install x86_get_thread_area and
11641 x86_install_fast_tracepoint_jump_pad.
11642 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11643 (struct fast_tracepoint_jump): New.
11644 (fast_tracepoint_jump_insn): New.
11645 (fast_tracepoint_jump_shadow): New.
11646 (find_fast_tracepoint_jump_at): New.
11647 (fast_tracepoint_jump_here): New.
11648 (delete_fast_tracepoint_jump): New.
11649 (set_fast_tracepoint_jump): New.
11650 (uninsert_fast_tracepoint_jumps_at): New.
11651 (reinsert_fast_tracepoint_jumps_at): New.
11652 (set_breakpoint_at): Use write_inferior_memory.
11653 (uninsert_raw_breakpoint): Use write_inferior_memory.
11654 (check_mem_read): Mask out fast tracepoint jumps.
11655 (check_mem_write): Mask out fast tracepoint jumps.
11656 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11657 (set_fast_tracepoint_jump): Declare.
11658 (delete_fast_tracepoint_jump)
11659 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11660 (reinsert_fast_tracepoint_jumps_at): Declare.
11661 * regcache.c: Don't compile many functions when building the
11662 in-process agent library.
11663 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11664 the register buffer in the heap.
11665 (free_register_cache): If the register buffer isn't owned by the
11666 regcache, don't free it.
11667 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11668 pre-existing register caches.
11669 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11670 type.
11671 (convert_ascii_to_int): : Constify `from' parameter type.
11672 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11673 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11674 the needed buffer in-place.
11675 (relocate_instruction): New.
11676 * server.c (handle_query) <qSymbols>: If the target supports
11677 tracepoints, give it a chance of looking up symbols. Report
11678 support for fast tracepoints.
11679 (handle_status): Stabilize threads.
11680 (process_serial_event): Adjust.
11681 * server.h (struct fast_tracepoint_jump): Forward declare.
11682 (struct process_info) <fast_tracepoint_jumps>: New field.
11683 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11684 (decode_X_packet, decode_M_packet): Adjust.
11685 (relocate_instruction): Declare.
11686 (in_process_agent_loaded): Declare.
11687 (tracepoint_look_up_symbols): Declare.
11688 (struct fast_tpoint_collect_status): Declare.
11689 (fast_tracepoint_collecting): Declare.
11690 (force_unlock_trace_buffer): Declare.
11691 (handle_tracepoint_bkpts): Declare.
11692 (initialize_low_tracepoint)
11693 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11694 * target.h (struct target_ops) <stabilize_threads,
11695 install_fast_tracepoint_jump_pad>: New fields.
11696 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11697 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11698 [HAVE_STDINT_H]: Include stdint.h.
11699 (trace_debug_1): Rename to ...
11700 (trace_vdebug): ... this.
11701 (trace_debug): Rename to ...
11702 (trace_debug_1): ... this. Add `level' parameter.
11703 (trace_debug): New.
11704 (ATTR_USED, ATTR_NOINLINE): New.
11705 (IP_AGENT_EXPORT): New.
11706 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11707 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11708 (about_to_request_buffer_space, trace_buffer_is_full)
11709 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11710 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11711 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11712 (traceframe_write_count, traceframes_created)
11713 (trace_state_variables)
11714 New renaming defines.
11715 (struct ipa_sym_addresses): New.
11716 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11717 (symbol_list): New.
11718 (ipa_sym_addrs): New.
11719 (all_tracepoint_symbols_looked_up): New.
11720 (in_process_agent_loaded): New.
11721 (write_e_ipa_not_loaded): New.
11722 (maybe_write_ipa_not_loaded): New.
11723 (tracepoint_look_up_symbols): New.
11724 (debug_threads) [IN_PROCESS_AGENT]: New.
11725 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11726 (UNKNOWN_SIDE_EFFECTS): New.
11727 (stop_tracing): New.
11728 (flush_trace_buffer): New.
11729 (stop_tracing_bkpt): New.
11730 (flush_trace_buffer_bkpt): New.
11731 (read_inferior_integer): New.
11732 (read_inferior_uinteger): New.
11733 (read_inferior_data_pointer): New.
11734 (write_inferior_data_pointer): New.
11735 (write_inferior_integer): New.
11736 (write_inferior_uinteger): New.
11737 (struct collect_static_trace_data_action): Delete.
11738 (enum tracepoint_type): New.
11739 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11740 <actions_str, step_actions, step_actions_str>: Only include in
11741 GDBserver.
fa593d66
PA
11742 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11743 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11744 (tracepoints): Use IP_AGENT_EXPORT.
11745 (last_tracepoint): Don't include in the IPA.
11746 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11747 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11748 (alloced_trace_state_variables): New.
11749 (trace_state_variables): Use IP_AGENT_EXPORT.
11750 (traceframe_t): Delete unused variable.
11751 (circular_trace_buffer): Don't include in the IPA.
11752 (trace_buffer_start): Delete.
11753 (struct trace_buffer_control): New.
11754 (trace_buffer_free): Delete.
11755 (struct ipa_trace_buffer_control): New.
11756 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11757 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11758 New.
11759 (trace_buffer_ctrl): New.
11760 (TRACE_BUFFER_CTRL_CURR): New.
11761 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11762 Reimplement as macros.
11763 (trace_buffer_wrap): Delete.
11764 (traceframe_write_count, traceframe_read_count)
11765 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11766 (struct tracepoint_hit_ctx) <type>: New field.
11767 (struct fast_tracepoint_ctx): New.
11768 (memory_barrier): New.
11769 (cmpxchg): New.
11770 (record_tracepoint_error): Update atomically in the IPA.
11771 (clear_inferior_trace_buffer): New.
11772 (about_to_request_buffer_space): New.
11773 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11774 updating the same buffer.
11775 (add_tracepoint): Default the tracepoint's type to trap
11776 tracepoint, and orig_size to -1.
11777 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11778 internal variables.
11779 (create_trace_state_variable): New parameter `gdb'. Handle it.
11780 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11781 (cmd_qtdp): Handle fast tracepoints.
11782 (cmd_qtdv): Adjust.
11783 (max_jump_pad_size): New.
11784 (gdb_jump_pad_head): New.
11785 (get_jump_space_head): New.
11786 (claim_jump_space): New.
11787 (sort_tracepoints): New.
11788 (MAX_JUMP_SIZE): New.
11789 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11790 IPA.
11791 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11792 support. Upload fast traceframes, and delete internal IPA
11793 breakpoints.
11794 (stop_tracing_handler): New.
11795 (flush_trace_buffer_handler): New.
11796 (cmd_qtstop): Upload fast tracepoints.
11797 (response_tracepoint): Handle fast tracepoints.
11798 (tracepoint_finished_step): Upload fast traceframes. Set the
11799 tracepoint hit context's tracepoint type.
11800 (handle_tracepoint_bkpts): New.
11801 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11802 type. Add comment about fast tracepoints.
11803 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11804 non-existing action_str field.
11805 (get_context_regcache): Handle fast tracepoints.
11806 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11807 to the regcache.
11808 (fast_tracepoint_from_jump_pad_address): New.
11809 (fast_tracepoint_from_ipa_tpoint_address): New.
11810 (collecting_t): New.
11811 (force_unlock_trace_buffer): New.
11812 (fast_tracepoint_collecting): New.
11813 (collecting): New.
11814 (gdb_collect): New.
11815 (write_inferior_data_ptr): New.
11816 (target_tp_heap): New.
11817 (target_malloc): New.
11818 (download_agent_expr): New.
11819 (UALIGN): New.
11820 (download_tracepoints): New.
11821 (download_trace_state_variables): New.
11822 (upload_fast_traceframes): New.
11823 (IPA_FIRST_TRACEFRAME): New.
11824 (IPA_NEXT_TRACEFRAME_1): New.
11825 (IPA_NEXT_TRACEFRAME): New.
11826 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11827 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11828 (gdb_jump_pad_buffer_end): New.
11829 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11830 (initialize_tracepoint): Adjust.
11831 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11832 buffer. Initialize the low module.
11833 * utils.c (PREFIX, TOOLNAME): New.
11834 (malloc_failure): Use PREFIX.
11835 (error): In the IPA, an error causes an exit.
11836 (fatal, warning): Use PREFIX.
11837 (internal_error): Use TOOLNAME.
11838 (NUMCELLS): Increase to 10.
11839 * configure, config.in: Regenerate.
11840
d149dd1d
PA
118412010-06-01 Pedro Alves <pedro@codesourcery.com>
11842
11843 * server.c (handle_query) <qSupported>: Do two passes over the
11844 qSupported string to avoid nesting strtok.
11845
f6528abd
JK
118462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11847
11848 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11849 (CDEPS): New.
11850 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11851 -Wl,--dynamic-list.
11852 * configure: Regenerate.
11853 * proc-service.list: New.
11854
ca2a87a0
JK
118552010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11856
11857 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11858 New comment.
11859
363a6e9f
OS
118602010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11861
11862 * gdbreplay.c (remote_open): Check error return from socket() call by
11863 its equality to -1 not by it being negative.
11864 * remote-utils.c (remote_open): Likewise.
11865
d23b6cb1
PA
118662010-05-23 Pedro Alves <pedro@codesourcery.com>
11867
11868 * config.h: Regenerate.
11869
28d3cf85
MK
118702010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11871
11872 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11873 doesn't provide PTRACE_GET_THREAD_AREA.
11874
fea36a59
MK
118752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11876
11877 * linux-m68k-low.c: Include <asm/ptrace.h>
11878 (ps_get_thread_area): Implement.
11879
24b066ba
DE
118802010-05-03 Doug Evans <dje@google.com>
11881
11882 * event-loop.c (struct callback_event): New struct.
11883 (callback_list): New global.
11884 (append_callback_event, delete_callback_event): New functions.
11885 (process_callback): New function.
11886 (start_event_loop): Call it.
11887 * remote-utils.c (NOT_SCHEDULED): Define.
11888 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11889 moved out of readchar.
11890 (readchar): Rewrite. Call reschedule before returning.
11891 (reset_readchar): New function.
11892 (remote_close): Call it.
11893 (process_remaining, reschedule): New functions.
11894 * server.h (callback_handler_func): New typedef.
11895 (append_callback_event, delete_callback_event): Declare.
11896
9836d6ea
PA
118972010-05-03 Pedro Alves <pedro@codesourcery.com>
11898
11899 * proc-service.c (ps_pglobal_lookup): Use
11900 thread_db_look_up_one_symbol.
11901 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11902 parameter. Use it instead of all_symbols_looked_up.
11903 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11904 field.
11905 (all_symbols_looked_up): Don't declare.
11906 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11907 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11908 field.
11909 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11910 Set all_symbols_looked_up here.
11911 (thread_db_look_up_one_symbol): New.
11912 (thread_db_get_tls_address): Adjust.
11913 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11914 thread_db object on the heap, and tentatively set it in the
11915 process structure.
11916 (thread_db_init): Don't set all_symbols_looked_up here.
11917 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11918
7984d532
PA
119192010-05-03 Pedro Alves <pedro@codesourcery.com>
11920
11921 * linux-low.c (linux_kill, linux_detach): Adjust.
11922 (status_pending_p_callback): Remove redundant statement. Check
11923 for !TARGET_WAITIKIND_IGNORE, instead of
11924 TARGET_WAITKIND_STOPPED.
11925 (handle_tracepoints): Make sure LWP is locked. Adjust.
11926 (linux_wait_for_event_1): Adjust.
11927 (linux_cancel_breakpoints): New.
11928 (unsuspend_one_lwp): New.
11929 (unsuspend_all_lwps): New.
11930 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11931 (send_sigstop_callback): Change return type to int, add new
11932 `except' parameter and handle it.
11933 (suspend_and_send_sigstop_callback): New.
11934 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11935 pass them down. If SUSPEND, also increment the lwp's suspend
11936 count.
11937 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11938 (need_step_over_p): Don't consider suspended LWPs.
11939 (start_step_over): Adjust.
11940 (proceed_one_lwp): Change return type to int, add new `except'
11941 parameter and handle it.
11942 (unsuspend_and_proceed_one_lwp): New.
11943 (proceed_all_lwps): Use find_inferior instead of
11944 for_each_inferior.
11945 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11946 also decrement the suspend count of LWPs. Pass `except' down,
11947 instead of hacking its suspend count.
11948 (linux_pause_all): Add `freeze' parameter. Adjust.
11949 (linux_unpause_all): New.
11950 (linux_target_ops): Install linux_unpause_all.
11951 * server.c (handle_status): Adjust.
11952 * target.h (struct target_ops): New fields `unpause_all' and
11953 `cancel_breakpoints'. Add new parameter to `pause_all'.
11954 (pause_all): Add new `freeze' parameter.
11955 (unpause_all): New.
11956 (cancel_breakpoints): New.
11957 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11958 cancel breakpoints.
11959 (cmd_qtstart): Pause threads.
11960 (stop_tracing): Pause threads, and cancel breakpoints.
11961 * win32-low.c (win32_target_ops): Adjust.
11962
e471f25b
PA
119632010-05-03 Pedro Alves <pedro@codesourcery.com>
11964
11965 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11966 the inferior right away from here...
11967 (linux_wait_1): ... to here, and adjust to check the thread's
11968 last_resume_kind instead of the lwp's step or stop_expected flags.
11969
1915ef4f
PA
119702010-05-02 Pedro Alves <pedro@codesourcery.com>
11971
11972 * README: Use consistent `GDB' and `GDBserver' spellings.
11973
f9e39928
PA
119742010-05-02 Pedro Alves <pedro@codesourcery.com>
11975
11976 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11977 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11978 (linux_detach_one_lwp): Assume the lwp is stopped.
11979 (any_thread_of): Delete.
11980 (linux_detach): Stop all lwps here. Don't blindly delete all
11981 breakpoints.
11982 (delete_lwp_callback): New.
11983 (linux_mourn): Delete all lwps of the process that is gone.
11984 (linux_wait_1): Don't delete the last lwp of the process here.
11985 * mem-break.h (mark_breakpoints_out): Declare.
11986 * mem-break.c (mark_breakpoints_out): New.
11987 (free_all_breakpoints): Use it.
11988 * server.c (handle_target_event): If the process is gone, mark
11989 breakpoints out.
11990 * thread-db.c (struct thread_db) <create_bp>: New field.
11991 (thread_db_enable_reporting): Fix prototype. Store a thread event
11992 breakpoint reference in the thread_db struct.
11993 (thread_db_load_search): Clear the thread_db object.
11994 (try_thread_db_load_1): Ditto.
11995 (switch_to_process): New.
11996 (disable_thread_event_reporting): Use it.
11997 (remove_thread_event_breakpoints): New.
11998 (thread_db_detach, thread_db_mourn): Use it.
11999
1e7fc18c
PA
120002010-05-01 Pedro Alves <pedro@codesourcery.com>
12001
12002 * linux-low.c (linux_enable_event_reporting): New.
12003 (linux_wait_for_event_1, handle_extended_wait): Use it.
12004
02fc4de7
PA
120052010-04-30 Pedro Alves <pedro@codesourcery.com>
12006
12007 * linux-low.c (linux_kill_one_lwp, linux_kill)
12008 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12009 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12010 SIGSTOP even if the LWP is stopped.
12011 (send_sigstop_callback): New.
12012 (stop_all_lwps): Use send_sigstop_callback instead.
12013 (linux_resume_one_thread): Adjust.
12014 (proceed_one_lwp): Still proceed an LWP that the client has
12015 requested to stop, if we haven't reported it as stopped yet. Make
12016 sure that LWPs the client want stopped, have a pending SIGSTOP.
12017
bc3b5632
DE
120182010-04-26 Doug Evans <dje@google.com>
12019
ae1ada35
DE
12020 * server.c (handle_general_set): Make static.
12021
bc3b5632
DE
12022 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12023 Print received char after testing for error/eof instead of before.
12024 (input_interrupt): Tweak comment.
12025
65730243
DE
120262010-04-23 Doug Evans <dje@google.com>
12027
12028 * server.c (start_inferior): Print inferior argv if --debug.
12029
a8ae7dc0
AR
120302010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12031
12032 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12033 * nto-x86-low.c: Include server.h
12034
1c07cc19
PM
120352010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12036
12037 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12038 be consistent with other sources of this directory.
12039 (init_registers_amd64): Correct name of source file of this function
12040 in the comment.
12041
e0a61e09
PM
120422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12043
12044 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12045 64-bit executables.
12046
54709339
PM
120472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12048
12049 * win32-i386-low.c: Add 64-bit support.
12050 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12051 (init_registers_amd64): Declare.
12052 (mappings): Add 64-bit version of array.
12053 (init_windows_x86): New function.
12054 (the_low_target): Change init_arch field to init_windows_x86.
12055
e8f0053d
PM
120562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12057
12058 * win32-low.c: Adapt to support also 64-bit architecture.
12059 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12060 (get_image_name): Use SIZE_T type for local variable `done'.
12061 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12062 (toolhelp_get_dll_name): Idem.
12063 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12064 Use uintptr_t typecast to avoid warning.
12065 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12066 (handle_exception): Use phex_nz to avoid warning.
12067 (win32_wait): Remove unused local variable `process'.
12068
c481e77e
PM
120692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12070
12071 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12072 `amd64-avx.o'.
12073
12ea4b69
PM
120742010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12075
12076 * configure.ac: Use `ws2_32' library for srv_mingw.
12077 * configure: Regenerate.
12078 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12079 * remote-utils.c: Likewise.
12080
f6d1620c
L
120812010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12082
12083 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12084 if __x86_64__ is defined.
12085
8e642873
PM
120862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12087
12088 * configure: Regenerate.
12089
711e434b
PM
120902010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12091
12092 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12093 * target.h (target_ops): New get_tib_address field.
12094 * win32-low.h (win32_thread_info): Add thread_local_base field.
12095 * win32-low.c (child_add_thread): Add tlb argument.
12096 Set thread_local_base field to TLB.
12097 (get_child_debug_event): Adapt to child_add_thread change.
12098 (win32_get_tib_address): New function.
12099 (win32_target_ops): Set get_tib_address field to
12100 win32_get_tib_address.
12101 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12102
505106cd
PA
121032010-04-12 Pedro Alves <pedro@codesourcery.com>
12104
505106cd
PA
12105 * linux-low.c (linux_mourn): Also remove the process.
12106 * server.c (handle_target_event): Don't remove the process here.
12107 * nto-low.c (nto_mourn): New.
12108 (nto_target_ops): Install it.
12109 * spu-low.c (spu_mourn): New.
12110 (spu_target_ops): Install it.
12111 * win32-low.c (win32_mourn): New.
12112 (win32_target_ops): Install it.
12113
e8470a06
PA
121142010-04-12 Pedro Alves <pedro@codesourcery.com>
12115
12116 * server.h (buffer_xml_printf): Remove redundant `;'.
12117
45ba0d02
PA
121182010-04-12 Pedro Alves <pedro@codesourcery.com>
12119
12120 * regcache.c (set_register_cache): Invalidate regcaches before
12121 changing the register cache layout.
12122 (regcache_invalidate_one): Allow a NULL regcache.
12123 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12124 regcaches before changing the register cache layout or the target
12125 regsets.
12126
59e04013
L
121272010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12128
12129 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12130 variable warning on Linux/x86-64.
12131
8336d594
PA
121322010-04-11 Pedro Alves <pedro@codesourcery.com>
12133
12134 GDBserver disconnected tracing support.
12135
12136 * linux-low.c (linux_remove_process): Delete.
12137 (add_lwp): Don't set last_resume_kind here.
12138 (linux_kill): Use `mourn'.
12139 (linux_detach): Use `thread_db_detach', and `mourn'.
12140 (linux_mourn): New.
12141 (linux_attach_lwp_1): Adjust comment.
12142 (linux_attach): last_resume_kind moved the thread_info; adjust.
12143 (status_pending_p_callback): Adjust.
12144 (linux_wait_for_event_1): Adjust.
12145 (count_events_callback, select_singlestep_lwp_callback)
12146 (select_event_lwp_callback, cancel_breakpoints_callback)
12147 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12148 (proceed_one_lwp): Adjust.
12149 (linux_async): Add debug output.
12150 (linux_thread_stopped): New.
12151 (linux_pause_all): New.
12152 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12153 linux_pause_all.
12154 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12155 (thread_db_free): Delete declaration.
12156 (thread_db_detach, thread_db_mourn): Declare.
12157 * thread-db.c (thread_db_init): Use thread_db_mourn.
12158 (thread_db_free): Delete, split in two.
12159 (disable_thread_event_reporting): New.
12160 (thread_db_detach): New.
12161 (thread_db_mourn): New.
12162
12163 * server.h (struct thread_info) <last_resume_kind>: New field.
12164 <attached>: Add comment.
12165 <gdb_detached>: New field.
12166 (handler_func): Change return type to int.
12167 (handle_serial_event, handle_target_event): Ditto.
12168 (gdb_connected): Declare.
12169 (tracing): Delete.
12170 (disconnected_tracing): Declare.
12171 (stop_tracing): Declare.
12172
12173 * server.c (handle_query) <qSupported>: Report support for
12174 disconnected tracing.
12175 (queue_stop_reply_callback): Account for running threads.
12176 (gdb_wants_thread_stopped): New.
12177 (gdb_wants_all_threads_stopped): New.
12178 (gdb_reattached_process): New.
12179 (handle_status): Clear the `gdb_detached' flag of all processes.
12180 In all-stop, stop all threads.
12181 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12182 (process_serial_event): If the remote connection breaks, or if an
12183 exit was forced with "monitor exit", force an event loop exit.
12184 Handle disconnected tracing on detach.
12185 (handle_serial_event): Adjust.
12186 (handle_target_event): If GDB isn't connected, forward events back
12187 to the inferior, unless the last process exited, in which case,
12188 exit gdbserver. Adjust interface.
12189
12190 * remote-utils.c (remote_open): Don't block in accept. Instead
12191 register an event loop source on the listen socket file
12192 descriptor. Refactor bits into ...
12193 (listen_desc): ... this new global.
12194 (gdb_connected): ... this new function.
12195 (enable_async_notification): ... this new function.
12196 (handle_accept_event): ... this new function.
12197 (remote_close): Clear remote_desc.
12198
12199 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12200
12201 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12202 New fields.
12203 (mourn_inferior): Define.
12204 (target_process_qsupported): Avoid the dangling else problem.
12205 (thread_stopped): Define.
12206 (pause_all): Define.
12207 (target_waitstatus_to_string): Declare.
12208 * target.c (target_waitstatus_to_string): New.
12209
12210 * tracepoint.c (tracing): Make extern.
12211 (disconnected_tracing): New.
12212 (stop_tracing): Make extern. Handle tracing stops due to GDB
12213 disconnecting.
12214 (cmd_qtdisconnected): New.
12215 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12216 (handle_tracepoint_general_set): Handle QTDisconnected.
12217
12218 * event-loop.c (event_handler_func): Change return type to int.
12219 (process_event): Bail out if the event handler wants the event
12220 loop to stop.
12221 (handle_file_event): Ditto.
12222 (start_event_loop): Bail out if the event handler wants the event
12223 loop to stop.
12224
12225 * nto-low.c (nto_target_ops): Adjust.
12226 * spu-low.c (spu_wait): Don't remove the process here.
12227 (spu_target_ops): Adjust.
12228 * win32-low.c (win32_wait): Don't remove the process here.
12229 (win32_target_ops): Adjust.
12230
5d267c4c
PA
122312010-04-11 Pedro Alves <pedro@codesourcery.com>
12232
12233 * regcache.c (realloc_register_cache): Invalidate inferior's
12234 regcache before recreating it.
12235
623ccd72
PA
122362010-04-09 Pedro Alves <pedro@codesourcery.com>
12237
12238 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12239
219f2f23
PA
122402010-04-09 Stan Shebs <stan@codesourcery.com>
12241 Pedro Alves <pedro@codesourcery.com>
12242
12243 * server.h (LONGEST): New.
12244 (struct thread_info) <while_stepping>: New field.
12245 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12246 Declare.
12247 (initialize_tracepoint, handle_tracepoint_general_set)
12248 (handle_tracepoint_query, tracepoint_finished_step)
12249 (tracepoint_was_hit, release_while_stepping_state_list):
12250 (current_traceframe): Declare.
12251 * server.c (handle_general_set): Handle tracepoint packets.
12252 (read_memory): New.
12253 (write_memory): New.
12254 (handle_search_memory_1): Use read_memory.
12255 (handle_query): Report support for conditional tracepoints, trace
12256 state variables, and tracepoint sources. Handle tracepoint
12257 queries.
12258 (main): Initialize the tracepoints module.
12259 (process_serial_event): Handle traceframe reads/writes.
12260
12261 * linux-low.c (handle_tracepoints): New.
12262 (linux_wait_1): Call it.
12263 (linux_resume_one_lwp): Handle while-stepping.
12264 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12265 (linux_target_ops): Install them.
12266 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12267 New field.
12268 * linux-x86-low.c (x86_supports_tracepoints): New.
12269 (the_low_target). Install it.
12270
12271 * mem-break.h (delete_breakpoint): Declare.
12272 * mem-break.c (delete_breakpoint): Make external.
12273
12274 * target.h (struct target_ops): Add `supports_tracepoints',
12275 `read_pc', and `write_pc' fields.
12276 (target_supports_tracepoints): Define.
12277 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12278 (phex_nz): New.
12279
12280 * regcache.h (struct regcache) <registers_owned>: New field.
12281 (init_register_cache, regcache_cpy): Declare.
12282 (regcache_read_pc, regcache_write_pc): Declare.
12283 (register_cache_size): Declare.
12284 (supply_regblock): Declare.
12285 * regcache.c (init_register_cache): New.
12286 (new_register_cache): Use it.
12287 (regcache_cpy): New.
12288 (register_cache_size): New.
12289 (supply_regblock): New.
12290 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12291
219f2f23
PA
12292 * tracepoint.c: New.
12293
12294 * Makefile.in (OBS): Add tracepoint.o.
12295 (tracepoint.o): New rule.
12296
3a13a53b
L
122972010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12298
12299 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12300 (i386-mmx.o): New.
12301 (i386-mmx.c): Likewise.
12302 (i386-mmx-linux.o): Likewise.
12303 (i386-mmx-linux.c): Likewise.
12304
12305 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12306 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12307 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12308 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12309
12310 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12311 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12312 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12313
1570b33e
L
123142010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12315
12316 * Makefile.in (clean): Updated.
12317 (i386-avx.o): New.
12318 (i386-avx.c): Likewise.
12319 (i386-avx-linux.o): Likewise.
12320 (i386-avx-linux.c): Likewise.
12321 (amd64-avx.o): Likewise.
12322 (amd64-avx.c): Likewise.
12323 (amd64-avx-linux.o): Likewise.
12324 (amd64-avx-linux.c): Likewise.
12325
12326 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12327 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12328 (srv_amd64_regobj): Add amd64-avx.o.
12329 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12330 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12331 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12332 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12333 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12334 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12335 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12336
12337 * i387-fp.c: Include "i386-xstate.h".
12338 (i387_xsave): New.
12339 (i387_cache_to_xsave): Likewise.
12340 (i387_xsave_to_cache): Likewise.
12341 (x86_xcr0): Likewise.
12342
12343 * i387-fp.h (i387_cache_to_xsave): Likewise.
12344 (i387_xsave_to_cache): Likewise.
12345 (x86_xcr0): Likewise.
12346
12347 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12348 * linux-crisv32-low.c (target_regsets): Likewise.
12349 * linux-m68k-low.c (target_regsets): Likewise.
12350 * linux-mips-low.c (target_regsets): Likewise.
12351 * linux-ppc-low.c (target_regsets): Likewise.
12352 * linux-s390-low.c (target_regsets): Likewise.
12353 * linux-sh-low.c (target_regsets): Likewise.
12354 * linux-sparc-low.c (target_regsets): Likewise.
12355 * linux-xtensa-low.c (target_regsets): Likewise.
12356
12357 * linux-low.c: Include <sys/uio.h>.
12358 (regsets_fetch_inferior_registers): Support nt_type.
12359 (regsets_store_inferior_registers): Likewise.
12360 (linux_process_qsupported): New.
12361 (linux_target_ops): Add linux_process_qsupported.
12362
12363 * linux-low.h (regset_info): Add nt_type.
12364 (linux_target_ops): Add process_qsupported.
12365
12366 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12367 and <sys/uio.h>.
12368 (init_registers_i386_avx_linux): New.
12369 (init_registers_amd64_avx_linux): Likewise.
12370 (xmltarget_i386_linux_no_xml): Likewise.
12371 (xmltarget_amd64_linux_no_xml): Likewise.
12372 (PTRACE_GETREGSET): Likewise.
12373 (PTRACE_SETREGSET): Likewise.
12374 (x86_fill_xstateregset): Likewise.
12375 (x86_store_xstateregset): Likewise.
12376 (use_xml): Likewise.
12377 (x86_linux_update_xmltarget): Likewise.
12378 (x86_linux_process_qsupported): Likewise.
12379 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12380 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12381 init_registers_i386_linux here. Call
12382 x86_linux_update_xmltarget.
12383 (the_low_target): Add x86_linux_process_qsupported.
12384
12385 * server.c (handle_query): Call target_process_qsupported.
12386
12387 * target.h (target_ops): Add process_qsupported.
12388 (target_process_qsupported): New.
12389
fc7238bb
PA
123902010-04-03 Pedro Alves <pedro@codesourcery.com>
12391
12392 * inferiors.c (add_thread): Set last_status kind to
12393 TARGET_WAITKIND_IGNORE.
12394 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12395 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12396 (linux_wait_1): Move `thread' local definition to block that uses
12397 it. Don't NULL initialize `event_child'.
12398 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12399 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12400 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12401
bdabb078
PA
124022010-04-01 Pedro Alves <pedro@codesourcery.com>
12403
12404 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12405 an extended waitstatus, or by a watchpoint.
12406 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12407 thread was stepping or has been stopped by a watchpoint.
12408
d3bbe7a0
PA
124092010-04-01 Pedro Alves <pedro@codesourcery.com>
12410
12411 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12412 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12413 of another, then delete the previous, and validate all
12414 breakpoints.
12415 (validate_inserted_breakpoint): New.
12416 (delete_disabled_breakpoints): New.
12417 (validate_breakpoints): New.
12418 (check_mem_read): Validate breakpoints before trusting their
12419 shadow. Delete disabled breakpoints.
12420 (check_mem_write): Validate breakpoints before trusting they
12421 should be inserted. Delete disabled breakpoints.
12422 * mem-break.h (validate_breakpoints):
12423 * server.c (handle_query): Validate breakpoints when we see a
12424 qSymbol query.
12425
8b07ae33
PA
124262010-04-01 Pedro Alves <pedro@codesourcery.com>
12427
12428 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12429 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12430 if we could tell there's a GDB breakpoint at stop_pc.
12431 (need_step_over_p): Don't do a step over if we find a GDB
12432 breakpoint at the resume PC.
12433
12434 * mem-break.c (struct raw_breakpoint): New.
12435 (enum bkpt_type): New type `gdb_breakpoint'.
12436 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12437 fields. New field `raw'.
12438 (find_raw_breakpoint_at): New.
12439 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12440 breakpoint instead.
12441 (set_breakpoint_at): Adjust.
12442 (delete_raw_breakpoint): New.
12443 (release_breakpoint): New.
12444 (delete_breakpoint): Rename to...
12445 (delete_breakpoint_1): ... this. Add proc parameter. Use
12446 release_breakpoint. Return ENOENT.
12447 (delete_breakpoint): Reimplement.
12448 (find_breakpoint_at): Delete.
12449 (find_gdb_breakpoint_at): New.
12450 (delete_breakpoint_at): Delete.
12451 (set_gdb_breakpoint_at): New.
12452 (delete_gdb_breakpoint_at): New.
12453 (gdb_breakpoint_here): New.
12454 (set_reinsert_breakpoint): Use release_breakpoint.
12455 (uninsert_breakpoint): Rename to ...
12456 (uninsert_raw_breakpoint): ... this.
12457 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12458 (reinsert_raw_breakpoint): Change parameter type to
12459 raw_breakpoint.
12460 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12461 instead.
12462 (check_breakpoints): Adjust. Use release_breakpoint.
12463 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12464 (breakpoint_inserted_here): Ditto.
12465 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12466 Don't trust the breakpoint's shadow if it is not inserted.
12467 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12468 (delete_all_breakpoints): Adjust.
12469 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12470 use delete_breakpoint_1.
12471
12472 * mem-break.h (breakpoints_supported): Delete declaration.
12473 (set_gdb_breakpoint_at): Declare.
12474 (gdb_breakpoint_here): Declare.
12475 (delete_breakpoint_at): Delete.
12476 (delete_gdb_breakpoint_at): Declare.
12477
12478 * server.h (struct raw_breakpoint): Forward declare.
12479 (struct process_info): New field `raw_breakpoints'.
12480
12481 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12482 breakpoints.
12483
6bf5e0ba
PA
124842010-03-24 Pedro Alves <pedro@codesourcery.com>
12485
12486 * linux-low.c (status_pending_p_callback): Fix comment.
12487 (linux_wait_for_event_1): Move most of the internal breakpoint
12488 handling from here...
12489 (linux_wait_1): ... to here.
12490 (count_events_callback): New.
12491 (select_singlestep_lwp_callback): New.
12492 (select_event_lwp_callback): New.
12493 (cancel_breakpoints_callback): New.
12494 (select_event_lwp): New.
12495 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12496 priority to all LWPs that have had events that should be reported
12497 to the client. Cancel breakpoints when about to reporting the
12498 event to the client, not while stopping lwps. No longer cancel
12499 finished single-steps here.
12500 (cancel_finished_single_step): Delete.
12501 (cancel_finished_single_steps): Delete.
12502
414a389f
PA
125032010-03-24 Pedro Alves <pedro@codesourcery.com>
12504
12505 * mem-break.c (enum bkpt_type): New.
12506 (struct breakpoint): New field `type'.
12507 (set_breakpoint_at): Change return type to struct breakpoint
12508 pointer. Set type to `other_breakpoint' by default.
12509 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12510 in the breakpoint list.
12511 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12512 (reinsert_breakpoint): Rename to ...
12513 (reinsert_raw_breakpoint): ... this.
12514 (reinsert_breakpoints_at): Adjust.
12515 * mem-break.h (struct breakpoint): Declare.
12516 (set_breakpoint_at): Change return type to struct breakpoint
12517 pointer.
12518
2280c721
PA
125192010-03-24 Pedro Alves <pedro@codesourcery.com>
12520
12521 * server.c (handle_query): Assign, not compare.
12522
d50171e4
PA
125232010-03-24 Pedro Alves <pedro@codesourcery.com>
12524
12525 Teach linux gdbserver to step-over-breakpoints.
12526
12527 * linux-low.c (can_hardware_single_step): New.
12528 (supports_breakpoints): New.
12529 (handle_extended_wait): If stopping threads, read the stop pc of
12530 the new cloned LWP.
12531 (get_pc): New.
12532 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12533 low target doesn't support retrieving the PC.
12534 (add_lwp): Set last_resume_kind to resume_continue.
12535 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12536 (linux_attach): Don't clear stop_expected. Set the lwp's
12537 last_resume_kind to resume_stop.
12538 (linux_detach_one_lwp): Don't check for removed breakpoints.
12539 (check_removed_breakpoint): Delete.
12540 (status_pending_p): Rename to ...
12541 (status_pending_p_callback): ... this. Don't check for removed
12542 breakpoints. Don't consider threads that are stopped from GDB's
12543 perspective.
12544 (linux_wait_for_lwp): Always read the stop_pc here.
12545 (cancel_breakpoint): New.
12546 (step_over_bkpt): New global.
12547 (linux_wait_for_event_1): Implement stepping over breakpoints.
12548 (gdb_wants_lwp_stopped): New.
12549 (gdb_wants_all_stopped): New.
12550 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12551 single-step traps here. Store the thread's last reported target
12552 wait status.
12553 (send_sigstop): Don't clear stop_expected. Always set it,
12554 instead.
12555 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12556 (cancel_finished_single_step): New.
12557 (cancel_finished_single_steps): New.
12558 (wait_for_sigstop): Don't cancel finished single-step traps here.
12559 (linux_resume_one_lwp): Don't check for removed breakpoints.
12560 Don't set `step' on non-hardware step archs.
12561 (linux_set_resume_request): Ignore resume_stop requests if already
12562 stopping or stopped. Set the lwp's last_resume_kind.
12563 (resume_status_pending_p): Don't check for removed breakpoints.
12564 (need_step_over_p): New.
12565 (start_step_over): New.
12566 (finish_step_over): New.
12567 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12568 requests. Clear the thread's last reported target waitstatus.
12569 Don't use the `suspended' flag. Don't consider pending breakpoints.
12570 (linux_resume): Start a step-over if necessary.
12571 (proceed_one_lwp): New.
12572 (proceed_all_lwps): New.
12573 (unstop_all_lwps): New.
12574 * linux-low.h (struct lwp_info): Rewrite comment for the
12575 `suspended' flag. Add the `stop_pc' field. Delete the
12576 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12577 Add `'last_resume_kind' and `need_step_over' fields.
12578 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12579 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12580 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12581 (set_raw_breakpoint_at): New.
12582 (set_breakpoint_at): Rewrite to use it.
12583 (reinsert_breakpoint_handler): Delete.
12584 (set_reinsert_breakpoint): New.
12585 (reinsert_breakpoint_by_bp): Delete.
12586 (delete_reinsert_breakpoints): New.
12587 (uninsert_breakpoint): Rewrite.
12588 (uninsert_breakpoints_at): New.
12589 (reinsert_breakpoint): Rewrite.
12590 (reinsert_breakpoints_at): New.
12591 (check_breakpoints): Rewrite.
12592 (breakpoint_here): New.
12593 (breakpoint_inserted_here): New.
12594 (check_mem_read): Adjust.
12595 * mem-break.h (breakpoints_supported, breakpoint_here)
12596 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12597 (reinsert_breakpoint_by_bp): Delete declaration.
12598 (delete_reinsert_breakpoints): Declare.
12599 (reinsert_breakpoint): Delete declaration.
12600 (reinsert_breakpoints_at): Declare.
12601 (uninsert_breakpoint): Delete declaration.
12602 (uninsert_breakpoints_at): Declare.
12603 (check_breakpoints): Adjust prototype.
12604 * server.h: Adjust include order.
12605 (struct thread_info): Declare here. Add a `last_status' field.
12606
30ba68cb
MS
126072010-03-23 Michael Snyder <msnyder@vmware.com>
12608
12609 * server.c (crc32): New function.
12610 (handle_query): Add handling for 'qCRC:' request.
12611
b9a881c2
PA
126122010-03-23 Pedro Alves <pedro@codesourcery.com>
12613
12614 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12615 lwp had been stopped by a watchpoint.
12616
e92d13d5
PA
126172010-03-16 Pedro Alves <pedro@codesourcery.com>
12618
12619 * server.h (internal_error): Declare.
12620 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12621 * utils.c (internal_error): New function.
12622
64daa791
AS
126232010-03-15 Andreas Schwab <schwab@redhat.com>
12624
12625 * configure.srv: Fix typo setting srv_regobj.
12626
f52cd8cd
PA
126272010-03-15 Pedro Alves <pedro@codesourcery.com>
12628
12629 * linux-low.c (fetch_register): Avoid passing a non string literal
12630 format to `error'.
12631 (usr_store_inferior_registers): Ditto.
12632
93ae6fdc
PA
126332010-03-14 Pedro Alves <pedro@codesourcery.com>
12634
12635 * linux-low.c (linux_write_memory): Bail out early if peeking
12636 memory failed.
12637
c3adc08c
PA
126382010-03-14 Pedro Alves <pedro@codesourcery.com>
12639
12640 * linux-low.h (struct lwp_info): New fields
12641 `stopped_by_watchpoint' and `stopped_data_address'.
12642 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12643 here, and cache them in the lwp object.
12644 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12645 directly.
12646 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12647 field.
12648 (linux_stopped_by_watchpoint): Rewrite.
12649 (linux_stopped_data_address): Rewrite.
12650
bce522a2
PA
126512010-03-06 Simo Melenius <simo.melenius@iki.fi>
12652
12653 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12654 switching the current inferior, not before.
12655
90884b2b
L
126562010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12657
12658 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12659 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12660 i386-linux.c and amd64-linux.c.
12661 (reg-i386.o): Removed.
12662 (reg-i386.c): Likewise.
12663 (reg-i386-linux.o): Likewise.
12664 (reg-i386-linux.c): Likewise.
12665 (reg-x86-64.o): Likewise.
12666 (reg-x86-64.c): Likewise.
12667 (reg-x86-64-linux.o): Likewise.
12668 (reg-x86-64-linux.c): Likewise.
12669 (i386.o): New.
12670 (i386.c): Likewise.
12671 (i386-linux.o): Likewise.
12672 (i386-linux.c): Likewise.
12673 (amd64.o): Likewise.
12674 (amd64.c): Likewise.
12675 (amd64-linux.o): Likewise.
12676 (amd64-linux.c): Likewise.
12677
12678 * configure.srv (srv_i386_regobj): New.
12679 (srv_i386_linux_regobj): Likewise.
12680 (srv_amd64_regobj): Likewise.
12681 (srv_amd64_linux_regobj): Likewise.
12682 (srv_i386_32bit_xmlfiles): Likewise.
12683 (srv_i386_64bit_xmlfiles): Likewise.
12684 (srv_i386_xmlfiles): Likewise.
12685 (srv_amd64_xmlfiles): Likewise.
12686 (srv_i386_linux_xmlfiles): Likewise.
12687 (srv_amd64_linux_xmlfiles): Likewise.
12688 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12689 srv_xmlfiles to $srv_i386_xmlfiles.
12690 (i[34567]86-*-mingw32ce*): Likewise.
12691 (i[34567]86-*-mingw*): Likewise.
12692 (i[34567]86-*-nto*): Likewise.
12693 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12694 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12695 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12696 (x86_64-*-linux*): Likewise.
12697
12698 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12699 (init_registers_amd64_linux): New.
12700 (x86_arch_setup): Replace init_registers_x86_64_linux with
12701 init_registers_amd64_linux.
12702
193f13e6
MK
127032010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12704
12705 * configure.ac: Check for libdl. If it is not available link against
12706 static libthread_db.
12707 * configure: Regenerate.
12708
85d721b8
PA
127092010-02-22 Pedro Alves <pedro@codesourcery.com>
12710
12711 PR9605
12712
12713 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12714 handing a read watchpoint.
12715 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12716
6076632b
DE
127172010-02-12 Doug Evans <dje@google.com>
12718
12719 * linux-low.c (linux_supports_tracefork_flag): Document.
12720 (linux_look_up_symbols): Add comment.
12721
3327ccf7
L
127222010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12723
12724 * regcache.c (supply_register): Clear regcache if buf is NULL.
12725
0718675c 127262010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12727 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12728
12729 * inferiors.c (find_inferior): Add function documentation.
12730 (unloaded_dll): Handle the case where the unloaded dll has not
12731 been previously registered in the dll list.
12732
177321bd
DJ
127332010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12734
12735 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12736 (thumb2_breakpoint): New.
12737 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12738
2b009048
DJ
127392010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12740
12741 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12742 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12743 breakpoints.
12744
3be029c7
PA
127452010-01-21 Pedro Alves <pedro@codesourcery.com>
12746
12747 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12748
18f5de3b
JK
127492010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12750
12751 * linux-s390-low.c (s390_collect_ptrace_register)
12752 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12753
3743bb4f
DE
127542010-01-21 Doug Evans <dje@google.com>
12755
14ce3065
DE
12756 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12757 (PTRACE_ARG4_TYPE): New macro.
12758 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12759 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12760 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12761 (usr_store_inferior_registers): Ditto.
12762 (linux_read_memory, linux_write_memory): Ditto.
12763 (linux_test_for_tracefork): Ditto.
12764
3743bb4f
DE
12765 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12766 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12767
8b315be5
PA
127682010-01-21 Pedro Alves <pedro@codesourcery.com>
12769
12770 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12771 target.
12772
85492558
PA
127732010-01-21 Pedro Alves <pedro@codesourcery.com>
12774
12775 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12776 prototype to take a regcache. Adjust.
12777
442ea881
PA
127782010-01-20 Pedro Alves <pedro@codesourcery.com>
12779
12780 * regcache.h (struct thread_info): Forward declare.
12781 (struct regcache): New.
12782 (new_register_cache): Adjust prototype.
12783 (get_thread_regcache): Declare.
12784 (free_register_cache): Adjust prototype.
12785 (registers_to_string, registers_from_string): Ditto.
12786 (supply_register, supply_register_by_name, collect_register)
12787 (collect_register_as_string, collect_register_by_name): Ditto.
12788 * regcache.c (struct inferior_regcache_data): Delete.
12789 (get_regcache): Rename to ...
12790 (get_thread_regcache): ... this. Adjust. Switch inferior before
12791 fetching registers.
12792 (regcache_invalidate_one): Adjust.
12793 (regcache_invalidate): Fix prototype.
12794 (new_register_cache): Return the new register cache.
12795 (free_register_cache): Change prototype.
12796 (realloc_register_cache): Adjust.
12797 (registers_to_string): Change prototype to take a regcache. Adjust.
12798 (registers_from_string): Ditto.
12799 (register_data): Ditto.
12800 (supply_register): Ditto.
12801 (supply_register_by_name): Ditto.
12802 (collect_register): Ditto.
12803 (collect_register_as_string): Ditto.
12804 (collect_register_by_name): Ditto.
12805 * server.c (process_serial_event): Adjust.
12806 * linux-low.h (regset_fill_func, regset_store_func): Change
12807 prototype.
12808 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12809 Change prototype.
12810 * linux-low.c (get_stop_pc): Adjust.
12811 (check_removed_breakpoint): Adjust.
12812 (linux_wait_for_event): Adjust.
12813 (linux_resume_one_lwp): Adjust.
12814 (fetch_register): Add regcache parameter. Adjust.
12815 (usr_store_inferior_registers): Ditto.
12816 (regsets_fetch_inferior_registers): Ditto.
12817 (regsets_store_inferior_registers): Ditto.
12818 (linux_fetch_registers, linux_store_registers): Ditto.
12819 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12820 regcache. Adjust.
43aaf8b6
PA
12821 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12822 Ditto.
442ea881
PA
12823 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12824 prototype to take a regcache.
12825 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12826 * remote-utils.c (convert_ascii_to_int, outreg)
12827 (prepare_resume_reply): Change prototype to take a regcache.
12828 Adjust.
12829 * target.h (struct target_ops) <fetch_registers, store_registers>:
12830 Change prototype to take a regcache.
12831 (fetch_inferior_registers, store_inferior_registers): Change
12832 prototype to take a regcache. Adjust.
12833 * proc-service.c (ps_lgetregs): Adjust.
12834 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12835 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12836 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12837 take a regcache. Adjust.
12838 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12839 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12840 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12841 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12842 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12843 (cris_cannot_fetch_register):
12844 (cris_breakpoint_at): Change prototype to take a regcache.
12845 Adjust.
12846 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12847 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12848 to take a regcache. Adjust.
12849 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12850 Adjust.
12851 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12852 take a regcache. Adjust.
12853 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12854 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12855 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12856 * linux-mips-low.c (mips_get_pc):
12857 (mips_set_pc): Change prototype to take a regcache. Adjust.
12858 (mips_reinsert_addr): Adjust.
12859 (mips_collect_register): Change prototype to take a regcache.
12860 Adjust.
12861 (mips_supply_register):
12862 (mips_collect_register_32bit, mips_supply_register_32bit)
12863 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12864 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12865 * linux-ppc-low.c (ppc_supply_ptrace_register)
12866 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12867 (parse_spufs_run): Adjust.
12868 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12869 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12870 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12871 take a regcache. Adjust.
12872 * linux-s390-low.c (s390_collect_ptrace_register)
12873 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12874 (s390_set_pc): Change prototype to take a regcache. Adjust.
12875 (s390_arch_setup): Adjust.
12876 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12877 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12878 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12879 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12880 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12881 regcache. Adjust.
12882 (sparc_breakpoint_at): Adjust.
12883 * linux-xtensa-low.c (xtensa_fill_gregset):
12884 (xtensa_store_gregset):
12885 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12886 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12887 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12888 prototype to take a regcache. Adjust.
12889 * win32-arm-low.c (arm_fetch_inferior_register)
12890 (arm_store_inferior_register): Change prototype to take a
12891 regcache. Adjust.
12892 * win32-i386-low.c (i386_fetch_inferior_register)
12893 (i386_store_inferior_register): Change prototype to take a
12894 regcache. Adjust.
12895 * win32-low.c (child_fetch_inferior_registers)
12896 (child_store_inferior_registers): Change prototype to take a
12897 regcache. Adjust.
12898 (win32_wait): Adjust.
12899 (win32_fetch_inferior_registers): Change prototype to take a
12900 regcache. Adjust.
12901 (win32_store_inferior_registers): Adjust.
12902 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12903 store_inferior_register>: Change prototype to take a regcache.
12904
60c3d7b0
DE
129052010-01-20 Doug Evans <dje@google.com>
12906
12907 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12908 #ifdef.
12909 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12910 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12911
dc146f7c
VP
129122010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12913
12914 * linux-low.c (linux_core_of_thread): New.
12915 (compare_ints, show_process, list_threads): New.
12916 (linux_qxfer_osdata): Report threads and cores.
12917 (linux_target_op): Register linux_core_of_thread.
12918 * remote-utils.c (prepare_resume_reply): Report the core.
12919 (buffer_xml_printf): Support %d specifier.
12920 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12921 New.
12922 (handle_query): Handle qXfer:threads. Announce availability
12923 thereof.
12924 * target.h (struct target_ops): New field core_of_thread.
12925
7803799a
UW
129262010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12927
12928 * Makefile.in (clean): Remove new generated files.
12929 (reg-s390.o, reg-s390.c): Remove rules.
12930 (reg-s390x.o, reg-s390x.c): Likewise.
12931 (s390-linux32.o, s390-linux32.c): Add rules.
12932 (s390-linux64.o, s390-linux64.c): Likewise.
12933 (s390x-linux64.o, s390x-linux64.c): Likewise.
12934 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12935 * linux-s390-low.c: Include <elf.h>.
12936 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12937 (init_registers_s390): Remove prototype.
12938 (init_registers_s390x): Likewise.
12939 (init_registers_s390_linux32): Add prototype.
12940 (init_registers_s390_linux64): Likewise.
12941 (init_registers_s390x_linux64): Likewise.
12942 (s390_num_regs_3264): New define.
12943 (s390_regmap_3264): New global variable.
12944 (s390_cannot_fetch_register): Remove obsolete check.
12945 (s390_cannot_store_register): Likewise.
12946 (s390_collect_ptrace_register): Handle upper/lower register halves.
12947 (s390_supply_ptrace_register): Likewise.
12948 (s390_fill_gregset): Update to register number changes.
12949 (s390_get_hwcap): New routine.
12950 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12951 Install appropriate regmap and register set.
12952
6e7ffa39
JB
129532010-01-01 Joel Brobecker <brobecker@adacore.com>
12954
12955 * server.c (gdbserver_version): Update copyright year to 2010.
12956 * gdbreplay.c (gdbreplay_version): Likewise.
12957
957f3f49
DE
129582009-12-28 Doug Evans <dje@google.com>
12959
12960 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12961 elf/external.h. Include <elf.h> instead but only if necessary.
12962
ca5c370d
PA
129632009-12-28 Pedro Alves <pedro@codesourcery.com>
12964
12965 * linux-low.c (linux_remove_process): Remove `detaching'
12966 parameter. Don't release/detach from thread_db here.
12967 (linux_kill): Release/detach from thread_db here, ...
12968 (linux_detach): ... and here, before actually detaching.
12969 (linux_wait_1): ... and here, when a process exits.
12970 * thread-db.c (any_thread_of): New.
12971 (thread_db_free): Switch the current inferior to a thread of the
12972 passed in process.
12973
4ee62156
DE
129742009-12-21 Doug Evans <dje@google.com>
12975
d90e6a88
DE
12976 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12977
c5f62d5f
DE
12978 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12979 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12980 warning ifndef __NR_tkill. Move setting of errno there too.
12981 Delete unnecessary resetting of errno after syscall.
12982 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12983
10e86dd7
DE
12984 * configure.ac: Check for dladdr.
12985 * config.in: Regenerate.
12986 * configure: Regenerate.
12987 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12988 (try_thread_db_load): Update.
12989
4ee62156
DE
12990 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12991
00f515da
DE
129922009-12-18 Doug Evans <dje@google.com>
12993
e9464885
DE
12994 * event-loop.c: Include unistd.h if it exists.
12995
07d4f67e
DE
12996 * linux-low.c (my_waitpid): Move definition away from being in
12997 between linux_tracefork_child/linux_test_for_tracefork.
12998
00f515da
DE
12999 * gdb_proc_service.h (psaddr_t): Fix type.
13000 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13001 signature to match glibc.
13002
1de1badb
DE
130032009-12-16 Doug Evans <dje@google.com>
13004
13005 * linux-low.c (linux_read_memory): Fix argument to read.
13006
aeeb81d1
PA
130072009-11-26 Pedro Alves <pedro@codesourcery.com>
13008
13009 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13010 events, don't leave current_inferior pointing at null.
13011
10357975
PA
130122009-11-26 Pedro Alves <pedro@codesourcery.com>
13013
13014 * win32-low.c (LOG): Delete.
13015 (OUTMSG): Output to stderr.
13016 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13017 on compile time LOG macro.
13018 (win32_wait): Fix debug output.
13019
cf6e3471
PA
130202009-11-26 Pedro Alves <pedro@codesourcery.com>
13021
13022 * win32-low.c (win32_add_one_solib): If the dll name is
13023 "ntdll.dll", prepend the system directory to the dll path.
13024
0c85e18e
MK
130252009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13026
13027 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13028
9ac544ce 130292009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13030 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13031
13032 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13033 * configure.ac: Check for __mcoldfire__ and set
13034 gdb_cv_m68k_is_coldfire.
13035 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13036 reg-cf.o and reg-m68k.o.
13037 * configure: Regenerated.
13038
fd7dd3e6
PA
130392009-11-16 Pedro Alves <pedro@codesourcery.com>
13040
13041 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13042 Pass it to thread_db_free.
13043 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13044 proper `detaching' argument to linux_remove_process.
13045 * linux-low.h (thread_db_free): Add `detaching' parameter.
13046 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13047 to thread_db_free.
13048 (thread_db_free): Add `detaching' parameter. Only
13049 call td_ta_clear_event if detaching from process.
13050
75aa492e
MK
130512009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13052
13053 * thread-db.c (thread_db_free): Fix typo.
13054
21e1bee4
PP
130552009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13056
13057 PR gdb/10838
13058 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13059
8838b45e
NS
130602009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13061
13062 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13063 with an i686 compiler.
13064 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13065 needed.
13066 * configure: Rebuilt.
13067
8a35fb51
SL
130682009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13069
13070 PR gdb/10783
13071
13072 * server.c (handle_search_memory_1): Correct read_addr initialization
13073 in loop for searching subsequent chunks.
13074
96f15937
PP
130752009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13076
13077 * configure.ac: New --with-libthread-db option.
13078 * thread-db.c: Allow direct dependence on libthread_db.
13079 (thread_db_free): Adjust.
13080 * config.in: Regenerate.
13081 * configure: Likewise.
889bf7c5 13082
5f7d1694
PP
130832009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13084
13085 PR gdb/10757
13086 * thread-db.c (attach_thread): New function.
13087 (maybe_attach_thread): Return success/failure.
13088 (find_new_threads_callback): Adjust.
889bf7c5
PA
13089 (thread_db_find_new_threads): Loop until no new threads.
13090
88e3b899
PA
130912009-10-13 Pedro Alves <pedro@codesourcery.com>
13092
13093 * proc-service.c (ps_lgetregs): Formatting.
13094
cdbfd419
PP
130952009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13096
13097 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13098 * configure.ac: Adjust.
13099 * linux-low.h (struct process_info_private): Move members to struct
13100 thread_db.
13101 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13102 * linux-low.c (linux_remove_process): Adjust.
13103 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13104 * server.c (handle_query): Move code ...
13105 (handle_monitor_command): ... here. New function.
13106 * target.h (struct target_ops): New member.
13107 * thread-db.c (struct thread_db): New.
13108 (libthread_db_search_path): New variable.
13109 (thread_db_create_event, thread_db_enable_reporting)
13110 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13111 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13112 (try_thread_db_load_1, dladdr_to_soname): New functions.
13113 (try_thread_db_load, thread_db_load_search): New functions.
13114 (thread_db_init): Search for libthread_db.
13115 (thread_db_free): New function.
13116 (thread_db_handle_monitor_command): Likewise.
13117 * config.in: Regenerate.
13118 * configure: Regenerate.
889bf7c5 13119
4168d2d6
UW
131202009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13121
13122 * spu-low.c (spu_kill): Wait for inferior to terminate.
13123 Call clear_inferiors.
13124 (spu_detach): Call clear_inferiors.
13125
81ecdfbb
RW
131262009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13127
13128 * aclocal.m4: Regenerate.
13129 * config.in: Likewise.
13130 * configure: Likewise.
13131
0b9ff2c0
UW
131322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13133
13134 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13135 (parse_spufs_run): New function.
13136 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13137 (ppc_breakpoint_at): Handle SPU breakpoints.
13138
efcbbd14
UW
131392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13140
13141 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13142 (SPUFS_MAGIC): Define.
13143 (spu_enumerate_spu_ids): New function.
13144 (linux_qxfer_spu): New function.
13145 (linux_target_ops): Install linux_qxfer_spu.
13146
f4d9bade
UW
131472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13148
13149 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13150 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13151 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13152 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13153 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13154 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13155 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13156 (init_registers_powerpc_cell32l): Add prototype.
13157 (init_registers_powerpc_cell64l): Likewise.
13158 (ppc_arch_setup): Detect Cell/B.E. architecture.
13159
96e946ca
RW
131602009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13161
13162 * Makefile.in (datarootdir): New variable.
13163
58d6951d
DJ
131642009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * linux-low.c (linux_write_memory): Update debugging output.
13167 * Makefile.in (clean): Add new descriptions.
13168 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13169 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13170 * configure.srv: Add new files for arm*-*-linux*.
13171 * linux-arm-low.c: Add new declarations.
13172 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13173 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13174 (HWCAP_VFPv3D16): New.
13175 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13176 instead of __IWMMXT__.
13177 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13178 (arm_arch_setup): New.
13179 (target_regsets): Remove #ifdef. Add VFP regset.
13180 (the_low_target): Use arm_arch_setup.
13181
12b42a12
DJ
131822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13183
13184 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13185 the main thread again.
13186
ac8c974e
AR
131872009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13188
13189 Adding Neutrino gdbserver.
13190 * configure: Regenerated.
13191 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13192 * configure.srv (i[34567]86-*-nto*): New target.
13193 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13194 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13195 (nto_comctrl) [__QNX__]: New function.
13196 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13197
4424e0c3 131982009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13199
13200 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13201 srv_tgtobj.
13202
912cf4ba
PA
132032009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13204 Pedro Alves <pedro@codesourcery.com>
13205
13206 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13207 don't support CONTEXT_EXTENDED_REGISTERS.
13208 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13209 (the_low_target): Install them.
13210 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13211 failing with ERROR_PIPE_NOT_CONNECTED.
13212
aa5ca48f
DE
132132009-06-30 Doug Evans <dje@google.com>
13214 Pierre Muller <muller@ics.u-strasbg.fr>
13215
13216 Add h/w watchpoint support to x86-linux, win32-i386.
13217 * Makefile.in (SFILES): Add i386-low.c
13218 (i386_low_h): Define.
13219 (i386-low.o): Add dependencies.
13220 (linux-x86-low.o): Add i386-low.h dependency.
13221 (win32-i386-low.o): Ditto.
13222 * i386-low.c: New file.
13223 * i386-low.h: New file.
13224 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13225 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13226 * linux-low.c (linux_add_process): Initialize arch_private.
13227 (linux_remove_process): Free arch_private.
13228 (add_lwp): Initialize arch_private.
13229 (delete_lwp): Free arch_private.
13230 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13231 provided.
13232 * linux-low.h (process_info_private): New member arch_private.
13233 (lwp_info): New member arch_private.
13234 (linux_target_ops): New members new_process, new_thread,
13235 prepare_to_resume.
13236 (ptid_of): New macro.
13237 * linux-x86-low.c: Include stddef.h, i386-low.h.
13238 (arch_process_info): New struct.
13239 (arch_lwp_info): New struct.
13240 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13241 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13242 (i386_dr_low_get_status): New function.
13243 (x86_insert_point, x86_remove_point): New functions.
13244 (x86_stopped_by_watchpoint): New function.
13245 (x86_stopped_data_address): New function.
13246 (x86_linux_new_process, x86_linux_new_thread): New functions.
13247 (x86_linux_prepare_to_resume): New function.
13248 (the_low_target): Add entries for insert_point, remove_point,
13249 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13250 prepare_to_resume.
13251 * server.c (debug_hw_points): New global.
13252 (monitor_show_help): Document set debug-hw-points.
13253 (handle_query): Process "set debug-hw-points".
13254 * server.h (debug_hw_points): Declare.
13255 (paddress): Declare.
13256 * utils.c (NUMCELLS, CELLSIZE): New macros.
13257 (get_sell, xsnprintf, paddress): New functions.
13258 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13259 remove_point, stopped_by_watchpoint, stopped_data_address.
13260 * win32-i386-low.c: Include i386-low.h.
13261 (debug_reg_state): Replaces dr.
13262 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13263 (i386_dr_low_get_status): New function.
13264 (i386_insert_point, i386_remove_point): New functions.
13265 (i386_stopped_by_watchpoint): New function.
13266 (i386_stopped_data_address): New function.
13267 (i386_initial_stuff): Update.
13268 (get_thread_context,set_thread_context,i386_thread_added): Update.
13269 (the_low_target): Add entries for insert_point,
13270 remove_point, stopped_by_watchpoint, stopped_data_address.
13271 * win32-low.c (win32_insert_watchpoint): New function.
13272 (win32_remove_watchpoint): New function.
13273 (win32_stopped_by_watchpoint): New function.
13274 (win32_stopped_data_address): New function.
13275 (win32_target_ops): Add entries for insert_watchpoint,
13276 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13277 * win32-low.h (win32_target_ops): New members insert_point,
13278 remove_point, stopped_by_watchpoint, stopped_data_address.
13279
d993e290
PA
132802009-06-25 Pedro Alves <pedro@codesourcery.com>
13281
13282 * server.c (process_serial_event): Re-return unsupported, not
13283 error, if the type isn't recognized. Re-allow supporting only
13284 insert or remove packets. Also call require_running for
13285 breakpoints. Add missing break statement to default case. Tidy.
13286 * target.h (struct target_ops): Rename insert_watchpoint to
13287 insert_point, and remove_watchpoint to remove_point.
13288
13289 * linux-low.h (struct linux_target_ops): Likewise.
13290 * linux-low.c (linux_insert_watchpoint): Rename to ...
13291 (linux_insert_point): ... this. Adjust.
13292 (linux_remove_watchpoint): Rename to ...
13293 (linux_remove_point): ... this. Adjust.
13294 (linux_target_ops): Adjust.
13295 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13296 (cris_insert_point): ... this.
13297 (cris_remove_watchpoint): Rename to ...
13298 (cris_remove_point): ... this.
13299 (the_low_target): Adjust.
13300
0f54c268
PM
133012009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13302
13303 * server.c (handle_v_kill): Pass signal_pid to
13304 kill_inferior if multi_process is zero.
13305
c6314022
AR
133062009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13307
13308 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13309 * target.h (target_ops): Comment for *_watchpoint to make it clear
13310 the functions can get types '0' and '1'.
13311
4463ce24
AR
133122009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13313
13314 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13315 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13316 * regcache.c (get_regcache): Likewise.
13317 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13318 * win32-low.c (child_fetch_inferior_registers): Remove check for
13319 regno 0.
13320
cf8fd78b
PA
133212009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13322 Pedro Alves <pedro@codesourcery.com>
13323
13324 * target.h (struct target_ops) <supports_multi_process>: New
13325 callback.
13326 (target_supports_multi_process): New.
13327 * server.c (handle_query): Even if GDB reports support, only
13328 enable multi-process if the target also supports it. Report
13329 multi-process support only if the target backend supports it.
13330 * linux-low.c (linux_supports_multi_process): New function.
13331 (linux_target_ops): Install it as target_supports_multi_process
13332 callback.
13333
47c0c975
DE
133342009-05-24 Doug Evans <dje@google.com>
13335
e09875d4
DE
13336 Global renaming of find_thread_pid to find_thread_ptid.
13337 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13338 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13339 All callers updated.
13340
e27d73f6
DE
13341 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13342 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13343 directly.
13344
47c0c975
DE
13345 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13346 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13347 (linux_resume_one_lwp): Ditto.
13348
2acc282a
DE
133492009-05-23 Doug Evans <dje@google.com>
13350
13351 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13352 from struct inferior_list_entry * to struct lwp_info *.
13353 All callers updated.
13354
9f1036c1
DE
133552009-05-13 Doug Evans <dje@google.com>
13356
13357 * linux-x86-low.c: Don't include assert.h.
13358 (x86_siginfo_fixup): Use fatal, not assert.
13359 (x86_arch_setup): Fix comment.
13360
d0722149
DE
133612009-05-12 Doug Evans <dje@google.com>
13362
13363 Biarch support for i386/amd64 gdbserver.
13364 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13365 Add linux-x86-low.c.
13366 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13367 (linux-x86-low.o): Add.
13368 * linux-x86-64-low.c: Delete.
13369 * linux-i386-low.c: Delete.
13370 * linux-x86-low.c: New file.
13371 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13372 linux-x86-low.o.
13373 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13374 linux-x86-low.o.
13375 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13376 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13377 (linux_child_pid_to_exec_file): New function.
13378 (elf_64_header_p, elf_64_file_p): New functions.
13379 (siginfo_fixup): New function.
13380 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13381 give target a chance to convert layout.
13382 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13383 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13384
fdeb2a12
DE
133852009-05-07 Doug Evans <dje@google.com>
13386
13387 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13388 (regsets_store_inferior_registers): Ditto.
13389
a6dbe5df
PA
133902009-05-06 Pedro Alves <pedro@codesourcery.com>
13391
13392 PR server/10048
13393
13394 * linux-low.c (must_set_ptrace_flags): Delete.
13395 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13396 of the global.
13397 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13398 `lwp->must_set_ptrace_flags' instead.
ba42693b 13399 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13400 (linux_wait_1): ... not here.
13401
5091eb23
DE
134022009-04-30 Doug Evans <dje@google.com>
13403
9f767825
DE
13404 * inferiors.c (started_inferior_callback): New function.
13405 (attached_inferior_callback): New function.
13406 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13407 * server.c (print_started_pid, print_attached_pid): New functions.
13408 (detach_or_kill_for_exit): New function.
13409 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13410 * server.h (have_started_inferiors_p): Declare.
13411 (have_attached_inferiors_p): Declare.
13412
5091eb23
DE
13413 * inferiors.c (remove_process): Fix memory leak, free process.
13414 * linux-low.c (linux_remove_process): New function.
13415 (linux_kill): Call it instead of remove_process.
13416 (linux_detach, linux_wait_1): Ditto.
13417
155c8968
PA
134182009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13419
13420 * configure.srv: Add x86 Windows CE target.
13421
7fe519cb
UW
134222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13423
13424 * inferiors.c (get_thread_process): Make global.
13425 * server.h (get_thread_process): Add prototype.
13426 * thread-db.c (find_one_thread): Use get_thread_process
13427 instead of current_process.
13428 (thread_db_get_tls_address): Do not crash if called when
13429 thread layer is not yet initialized.
13430
5472f405
UW
134312009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13432
13433 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13434 * spu-low.c (current_tid): Rename to ...
13435 (current_ptid): ... this.
13436 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13437 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13438 ptid_get_lwp (current_ptid) instead of current_tid.
13439 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13440 instead of current_tid. Use find_process_pid to verify pid
13441 argument is valid. Pass proper argument to remove_process.
13442 (spu_thread_alive): Compare current_ptid instead of current_tid.
13443 (spu_resume): Likewise.
13444
55ac2b99
PA
134452009-04-02 Pedro Alves <pedro@codesourcery.com>
13446
13447 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13448 variable.
13449
95954743
PA
134502009-04-01 Pedro Alves <pedro@codesourcery.com>
13451
13452 Implement the multiprocess extensions, and add linux multiprocess
13453 support.
13454
13455 * server.h (ULONGEST): Declare.
13456 (struct ptid, ptid_t): New.
13457 (minus_one_ptid, null_ptid): Declare.
13458 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13459 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13460 (struct inferior_list_entry): Change `id' type from unsigned from
13461 to ptid_t.
13462 (struct sym_cache, struct breakpoint, struct
13463 process_info_private): Forward declare.
13464 (struct process_info): Declare.
13465 (current_process): Declare.
13466 (all_processes): Declare.
13467 (initialize_inferiors): Declare.
13468 (add_thread): Adjust to use ptid_t.
13469 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13470 (add_process, remove_process, find_thread_pid): Declare.
13471 (find_inferior_id): Adjust to use ptid_t.
13472 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13473 (multi_process): Declare.
13474 (push_event): Adjust to use ptid_t.
13475 (read_ptid, write_ptid): Declare.
13476 (prepare_resume_reply): Adjust to use ptid_t.
13477 (clear_symbol_cache): Declare.
13478 * inferiors.c (all_processes): New.
13479 (null_ptid, minus_one_ptid): New.
13480 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13481 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13482 (add_thread): Change unsigned long to ptid. Remove gdb_id
13483 parameter. Adjust.
13484 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13485 (gdb_id_to_thread): Rename to ...
13486 (find_thread_pid): ... this. Change unsigned long to ptid.
13487 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13488 (loaded_dll, pull_pid_from_list): Adjust.
13489 (add_process, remove_process, find_process_pid)
13490 (get_thread_process, current_process, initialize_inferiors): New.
13491 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13492 (struct target_waitstatus) <related_pid>: Ditto.
13493 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13494 return type to int.
13495 (struct target_ops) <join>: Add `pid' argument.
13496 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13497 (struct target_ops) <wait>: Add `ptid' field. Change return type
13498 to ptid.
13499 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13500 (mywait): Add `ptid' argument. Change return type to ptid_t.
13501 (target_pid_to_str): Declare.
13502 * target.c (set_desired_inferior): Adjust to use ptids.
13503 (mywait): Add new `ptid' argument. Adjust.
13504 (target_pid_to_str): New.
13505 * mem-break.h (free_all_breakpoints): Declare.
13506 * mem-break.c (breakpoints): Delelete.
13507 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13508 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13509 to use per-process breakpoint list.
13510 (free_all_breakpoints): New.
13511 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13512 (symbol_cache, all_symbols_looked_up): Delete.
13513 (hexchars): New.
13514 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13515 read_ptid): New.
13516 (prepare_resume_reply): Change ptid argument's type from unsigned
13517 long to ptid_t. Adjust. Implement W;process and X;process.
13518 (free_sym_cache, clear_symbol_cache): New.
13519 (look_up_one_symbol): Adjust to per-process symbol cache. *
13520 * server.c (cont_thread, general_thread, step_thread): Change type
13521 to ptid_t.
13522 (attached): Delete.
13523 (multi_process): New.
13524 (last_ptid): Change type to ptid_t.
13525 (struct vstop_notif) <ptid>: Change type to ptid_t.
13526 (queue_stop_reply, push_event): Change `ptid' argument's type to
13527 ptid_t.
13528 (discard_queued_stop_replies): Add `pid' argument.
13529 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13530 changes. Don't reference the `attached' global.
13531 (attach_inferior): Adjust to mywait interface changes.
13532 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13533 features. Handle and report "multiprocess+". Handle
13534 "qAttached:PID".
13535 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13536 changes.
13537 (handle_v_kill): New.
13538 (handle_v_stopped): Adjust to use target_pid_to_str.
13539 (handle_v_requests): Allow multiple attaches and runs when
13540 multiprocess extensions are in effect. Handle "vKill".
13541 (myresume): Adjust to use ptids.
13542 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13543 (handle_status): Adjust to discard_queued_stop_replies interface
13544 change.
13545 (first_thread_of, kill_inferior_callback)
13546 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13547 (main): Call initialize_inferiors. Adjust to use ptids, killing
13548 and detaching from all inferiors. Handle multiprocess packet
13549 variants.
13550 * linux-low.h: Include gdb_proc_service.h.
13551 (struct process_info_private): New.
13552 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13553 <lwpid_of>: Use ptid_get_lwp.
13554 (get_lwp_thread): Adjust.
13555 (struct lwp_info): Add `dead' member.
13556 (find_lwp_pid): Declare.
13557 * linux-low.c (thread_db_active): Delete.
13558 (new_inferior): Adjust comment.
13559 (inferior_pid): Delete.
13560 (linux_add_process): New.
13561 (handle_extended_wait): Adjust.
13562 (add_lwp): Change unsigned long to ptid.
13563 (linux_create_inferior): Add process to processes table. Adjust
13564 to use ptids. Don't set new_inferior here.
13565 (linux_attach_lwp): Rename to ...
13566 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13567 it. Adjust to use ptids.
13568 (linux_attach_lwp): New.
13569 (linux_attach): Add process to processes table. Don't set
13570 new_inferior here.
13571 (struct counter): New.
13572 (second_thread_of_pid_p, last_thread_of_process_p): New.
13573 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13574 multiple processes.
13575 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13576 processes. Remove process from process table.
13577 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13578 to multiple processes.
13579 (any_thread_of): New.
13580 (linux_detach): Add `pid' argument, and handle it. Remove process
13581 from processes table.
13582 (linux_join): Add `pid' argument. Handle it.
13583 (linux_thread_alive): Change unsighed long argument to ptid_t.
13584 Consider dead lwps as not being alive.
13585 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13586 threads we're not interested in.
13587 (same_lwp, find_lwp_pid): New.
13588 (linux_wait_for_lwp): Change `pid' argument's type from int to
13589 ptid_t. Adjust.
13590 (linux_wait_for_event): Rename to ...
13591 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13592 from int to ptid_t. Adjust.
13593 (linux_wait_for_event): New.
13594 (linux_wait_1): Add `ptid' argument. Change return type to
13595 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13596 that exit from the process table.
13597 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13598 Adjust.
13599 (mark_lwp_dead): New.
13600 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13601 stopping all threads, mark its main lwp as dead.
13602 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13603 ptids.
13604 (fetch_register, usr_store_inferior_registers)
13605 (regsets_fetch_inferior_registers)
13606 (regsets_store_inferior_registers, linux_read_memory)
13607 (linux_write_memory): Inline `inferior_pid'.
13608 (linux_look_up_symbols): Adjust to use per-process
13609 `thread_db_active'.
13610 (linux_request_interrupt): Adjust to use ptids.
13611 (linux_read_auxv): Inline `inferior_pid'.
13612 (initialize_low): Don't reference thread_db_active.
13613 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13614 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13615 (ps_getpid): Return the pid of the current inferior.
13616 * thread-db.c (proc_handle, thread_agent): Delete.
13617 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13618 per-process data.
13619 (find_one_thread): Change argument type to ptid_t. Adjust to
13620 per-process data.
13621 (maybe_attach_thread): Adjust to per-process data and ptids.
13622 (thread_db_find_new_threads): Ditto.
13623 (thread_db_init): Ditto.
13624 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13625 processes table. Adjust to use ptids.
13626 (spu_kill, spu_detach): Adjust interface. Remove process from
13627 processes table.
13628 (spu_join, spu_thread_alive): Adjust interface.
13629 (spu_wait): Adjust interface. Remove process from processes
13630 table. Adjust to use ptids.
13631 * win32-low.c (current_inferior_tid): Delete.
13632 (current_inferior_ptid): New.
13633 (debug_event_ptid): New.
13634 (thread_rec): Take a ptid. Adjust.
13635 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13636 (child_delete_thread): Ditto.
13637 (do_initial_child_stuff): Add `attached' argument. Add process to
13638 processes table.
13639 (child_fetch_inferior_registers, child_store_inferior_registers):
13640 Adjust.
13641 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13642 (win32_attach): Pass 1 to do_initial_child_stuff.
13643 (win32_kill): Adjust interface. Remove process from processes
13644 table.
13645 (win32_detach): Ditto.
13646 (win32_join): Adjust interface.
13647 (win32_thread_alive): Take a ptid.
13648 (win32_resume): Adjust to use ptids.
13649 (get_child_debug_event): Ditto.
13650 (win32_wait): Adjust interface. Remove exiting process from
13651 processes table.
13652
bd99dc85
PA
136532009-04-01 Pedro Alves <pedro@codesourcery.com>
13654
13655 Non-stop mode support.
13656
13657 * server.h (non_stop): Declare.
13658 (gdb_client_data, handler_func): Declare.
13659 (delete_file_handler, add_file_handler, start_event_loop):
13660 Declare.
13661 (handle_serial_event, handle_target_event, push_event)
13662 (putpkt_notif): Declare.
13663 * target.h (enum resume_kind): New.
13664 (struct thread_resume): Replace `step' field by `kind' field.
13665 (TARGET_WNOHANG): Define.
13666 (struct target_ops) <wait>: Add `options' argument.
13667 <supports_non_stop, async, start_non_stop>: New fields.
13668 (target_supports_non_stop, target_async): New.
13669 (start_non_stop): Declare.
13670 (mywait): Add `options' argument.
13671 * target.c (mywait): Add `options' argument. Print child exit
13672 notifications here.
13673 (start_non_stop): New.
13674 * server.c (non_stop, own_buf, mem_buf): New globals.
13675 (struct vstop_notif): New.
13676 (notif_queue): New global.
13677 (queue_stop_reply, push_event, discard_queued_stop_replies)
13678 (send_next_stop_reply): New.
13679 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13680 interface changes.
13681 (attach_inferior): In non-stop mode, don't wait for the target
13682 here.
13683 (handle_general_set): Handle QNonStop.
13684 (handle_query): When handling qC, return the current general
13685 thread, instead of the first thread of the list.
13686 (handle_query): If the backend supports non-stop mode, include
13687 QNonStop+ in the qSupported query response.
13688 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13689 and non-stop mode.
13690 (handle_v_attach, handle_v_run): Handle non-stop mode.
13691 (handle_v_stopped): New.
13692 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13693 (myresume): Adjust to use resume_kind. Handle non-stop.
13694 (queue_stop_reply_callback): New.
13695 (handle_status): Handle non-stop mode.
13696 (main): Clear non_stop flag on reconnection. Use the event-loop.
13697 Refactor serial protocol handling from here ...
13698 (process_serial_event): ... to this new function. When GDB
13699 selects any thread, select one here. In non-stop mode, wait until
13700 GDB acks all pending events before exiting.
13701 (handle_serial_event, handle_target_event): New.
13702 * remote-utils.c (remote_open): Install remote_desc in the event
13703 loop.
13704 (remote_close): Remove remote_desc from the event loop.
13705 (putpkt_binary): Rename to...
13706 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13707 (putpkt_binary): New as wrapper around putpkt_binary_1.
13708 (putpkt_notif): New.
13709 (prepare_resume_reply): In non-stop mode, don't change the
13710 general_thread.
13711 * event-loop.c: New.
13712 * Makefile.in (OBJ): Add event-loop.o.
13713 (event-loop.o): New rule.
13714
13715 * linux-low.h (pid_of): Moved here.
13716 (lwpid_of): New.
13717 (get_lwp_thread): Use lwpid_of.
13718 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13719 * linux-low.c (pid_of): Delete.
13720 (inferior_pid): Use lwpid_of.
13721 (linux_event_pipe): New.
13722 (target_is_async_p): New.
13723 (delete_lwp): New.
13724 (handle_extended_wait): Use lwpid_of.
13725 (add_lwp): Don't set lwpid field.
13726 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13727 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13728 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13729 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13730 first. Adjust to linux_wait_for_event interface changes. Use
13731 lwpid_of.
13732 (linux_detach): Don't delete the main lwp here.
13733 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13734 (status_pending_p): Don't consider explicitly suspended lwps.
13735 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13736 pointer. Add OPTIONS argument. Change return type to int. Use
13737 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13738 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13739 pointer. Add status pointer argument. Return a pid instead of a
13740 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13741 changes. In non-stop mode, don't switch to a random thread.
13742 (linux_wait): Rename to...
13743 (linux_wait_1): ... this. Add target_options argument, and handle
13744 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13745 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13746 clean exit and signal exit code. Don't stop all threads in
13747 non-stop mode. In all-stop mode, only stop all threads when
13748 reporting a stop to GDB. Handle explicit thread stop requests.
13749 (async_file_flush, async_file_mark): New.
13750 (linux_wait): New.
13751 (send_sigstop): Use lwpid_of.
13752 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13753 interface changes. In non-stop mode, don't switch to a random
13754 thread.
13755 (linux_resume_one_lwp): Use lwpid_of.
13756 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13757 (linux_resume_one_thread): ... this. Handle resume_stop. In
13758 non-stop mode, don't look for pending flag in all threads.
13759 (resume_status_pending_p): Don't consider explicitly suspended
13760 threads.
13761 (my_waitpid): Reimplement. Emulate __WALL.
13762 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13763 Use lwpid_of.
13764 (sigchld_handler, linux_supports_non_stop, linux_async)
13765 (linux_start_non_stop): New.
13766 (linux_target_ops): Register linux_supports_non_stop, linux_async
13767 and linux_start_non_stop.
13768 (initialize_low): Install SIGCHLD handler.
13769 * thread-db.c (thread_db_create_event, find_one_thread)
13770 (thread_db_get_tls_address): Use lwpid_of.
13771 * win32-low.c (win32_detach): Adjust to use resume_kind.
13772 (win32_wait): Add `options' argument.
13773 * spu-low.c (spu_resume): Adjust to use resume_kind.
13774 (spu_wait): Add `options' argument.
13775
5b1c542e
PA
137762009-04-01 Pedro Alves <pedro@codesourcery.com>
13777
13778 Decouple target code from remote protocol.
13779
13780 * target.h (enum target_waitkind): New.
13781 (struct target_waitstatus): New.
13782 (struct target_ops) <wait>: Return an unsigned long. Take a
13783 target_waitstatus pointer instead of a char pointer.
13784 (mywait): Likewise.
13785 * target.c (mywait): Change prototype to return an unsigned long.
13786 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13787 * server.h (thread_from_wait, old_thread_from_wait): Delete
13788 declarations.
13789 (prepare_resume_reply): Change prototype to take a
13790 target_waitstatus.
13791 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13792 (last_status, last_ptid): New.
13793 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13794 pid instead of a signal.
13795 (attach_inferior): Remove "status" and "signal" parameters.
13796 Adjust.
13797 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13798 not as an address.
13799 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13800 (handle_v_requests, myresume): Remove "status" and "signal"
13801 parameters. Adjust.
13802 (handle_status): New.
13803 (main): Delete local `status'. Adjust.
13804 * remote-utils.c: Include target.h.
13805 (prepare_resume_reply): Change prototype to take a
13806 target_waitstatus. Adjust.
13807
13808 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13809 interface.
13810 * spu-low.c (spu_wait): Adjust.
13811 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13812 Delete.
13813 (win32_wait): Adjust.
13814
2bd7c093
PA
138152009-04-01 Pedro Alves <pedro@codesourcery.com>
13816
13817 * target.h (struct thread_resume): Delete leave_stopped member.
13818 (struct target_ops): Add a `n' argument to the `resume' callback.
13819 * server.c (start_inferior): Adjust.
13820 (handle_v_cont, myresume): Adjust.
13821 * linux-low.c (check_removed_breakpoint): Adjust to resume
13822 interface change, and to removed leave_stopped field.
13823 (resume_ptr): Delete.
13824 (struct thread_resume_array): New.
13825 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13826 resume interface change.
13827 (linux_continue_one_thread, linux_queue_one_thread)
13828 (resume_status_pending_p): Check if the resume field is NULL
13829 instead of checking the leave_stopped member.
13830 (linux_resume): Adjust to the target resume interface change.
13831 * spu-low.c (spu_resume): Adjust to the target resume interface
13832 change.
13833 * win32-low.c (win32_detach, win32_resume): Ditto.
13834
c35fafde
PA
138352009-04-01 Pedro Alves <pedro@codesourcery.com>
13836
13837 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13838 flag.
13839 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13840 pending.
13841 (linux_continue_one_thread): Only preserve the stepping flag if
13842 there's a pending breakpoint.
13843
0a59d50b
PA
138442009-03-31 Pedro Alves <pedro@codesourcery.com>
13845
13846 * server.c (main): After the inferior having exited, call
13847 remote_close before exiting gdbserver.
13848
f04c6d38
TJB
138492009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13850
13851 Fix size of FPSCR in Power 7 processors.
13852 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13853 (PPC_FEATURE_HAS_DFP): New #define.
13854 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13855 size of the FPSCR.
13856
78e5cee6
PA
138572009-03-23 Pedro Alves <pedro@codesourcery.com>
13858
13859 * server.c (handle_query) Whitespace and formatting.
13860
1b3f6016
PA
138612009-03-22 Pedro Alves <pedro@codesourcery.com>
13862
13863 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13864 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13865 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13866 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13867 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13868 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13869 Makefile.in, configure.ac: Fix whitespace throughout.
13870 * configure: Regenerate.
13871
a07b2135
PA
138722009-03-22 Pedro Alves <pedro@codesourcery.com>
13873
13874 * inferiors.c (find_inferior): Make it safe for the callback
13875 function to delete the currently iterated inferior.
13876
67cc2626
PA
138772009-03-22 Pedro Alves <pedro@codesourcery.com>
13878
13879 * Makefile.in (linuw_low_h): Move higher.
13880 (thread-db.o): Depend on $(linux_low_h).
13881
54a0b537
PA
138822009-03-17 Pedro Alves <pedro@codesourcery.com>
13883
13884 Rename "process" to "lwp" throughout.
13885
13886 * linux-low.c (all_processes): Rename to...
13887 (all_lwps): ... this.
13888 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13889 (add_process): Rename to ...
13890 (add_lwp): ... this. Adjust.
13891 (linux_create_inferior): Adjust.
13892 (linux_attach_lwp): Adjust.
13893 (linux_attach): Adjust.
13894 (linux_kill_one_process): Rename to ...
13895 (linux_kill_one_lwp): ... this. Adjust.
13896 (linux_kill): Adjust.
13897 (linux_detach_one_process): Rename to ...
13898 (linux_detach_one_lwp): ... this. Adjust.
13899 (linux_detach): Adjust.
13900 (check_removed_breakpoint): Adjust.
13901 (status_pending_p): Adjust.
13902 (linux_wait_for_process): Rename to ...
13903 (linux_wait_for_lwp): ... this. Adjust.
13904 (linux_wait_for_event): Adjust.
13905 (send_sigstop): Adjust.
13906 (wait_for_sigstop): Adjust.
13907 (stop_all_processes): Rename to ...
13908 (stop_all_lwps): ... this.
13909 (linux_resume_one_process): Rename to ...
13910 (linux_resume_one_lwp): ... this. Adjust.
13911 (linux_set_resume_request, linux_continue_one_thread)
13912 (linux_queue_one_thread, resume_status_pending_p)
13913 (usr_store_inferior_registers, regsets_store_inferior_registers)
13914 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13915 Adjust.
13916 * linux-low.h (get_process): Rename to ...
13917 (get_lwp): ... this. Adjust.
13918 (get_thread_process): Rename to ...
13919 (get_thread_lwp): ... this. Adjust.
13920 (get_process_thread): Rename to ...
13921 (get_lwp_thread): ... this. Adjust.
13922 (struct process_info): Rename to ...
13923 (struct lwp_info): ... this.
13924 (all_processes): Rename to ...
13925 (all_lwps): ... this.
13926 * proc-service.c (ps_lgetregs): Adjust.
13927 * thread-db.c (thread_db_create_event, find_one_thread)
13928 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13929
0b16c5cf
PA
139302009-03-14 Pedro Alves <pedro@codesourcery.com>
13931
13932 * server.c (handle_query): Handle "qAttached".
13933
32de4b9d
NS
139342009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13935
13936 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13937 GPLv3, update license URL.
13938
2aecd87f
DE
139392009-03-01 Doug Evans <dje@google.com>
13940
93efd302 13941 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13942 (server_h): Add gdb_signals.h.
13943 (signals.o): Update.
13944 * server.h (target_signal_from_host,target_signal_to_host_p)
13945 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13946
86b1f9c5
PM
139472009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13948
13949 * remote-utils.c (getpkt): Also generate remote-debug
13950 information if noack_mode is set.
13951
4aa995e1
PA
139522009-02-06 Pedro Alves <pedro@codesourcery.com>
13953
13954 * server.c (handle_query): Report qXfer:siginfo:read and
13955 qXfer:siginfo:write as supported and handle them.
13956 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13957 * linux-low.c (linux_xfer_siginfo): New.
13958 (linux_target_ops): Set it.
13959
62709adf
PA
139602009-01-26 Pedro Alves <pedro@codesourcery.com>
13961
13962 * server.c (gdbserver_usage): Mention --remote-debug.
13963 (main): Accept '--remote-debug' switch.
13964
aef93bd7
DE
139652009-01-18 Doug Evans <dje@google.com>
13966
13967 * regcache.c (new_register_cache): No need to check result of xcalloc.
13968 * server.c (handle_search_memory): Back out calls to xmalloc,
13969 result is checked and error is returned to user upon failure.
13970 (handle_query): Ditto. Add more checks for result of malloc.
13971 (handle_v_cont): Check result of malloc, report error back to
13972 user upon failure.
13973 (handle_v_run): Ditto. Call freeargv.
13974 * server.h (freeargv): Declare.
13975 * utils.c (freeargv): New fn.
13976
54363045
DE
139772009-01-15 Doug Evans <dje@google.com>
13978
f626972c
DE
13979 * gdbreplay.c (perror_with_name): Make arg const char *.
13980 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13981 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13982 * utils.c (perror_with_name): Make arg const char *.
54363045 13983
18aae699
PA
139842009-01-14 Pedro Alves <pedro@codesourcery.com>
13985
13986 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13987 when handling a EXIT_PROCESS_DEBUG_EVENT.
13988
ff703abe
JB
139892009-01-06 Joel Brobecker <brobecker@adacore.com>
13990
13991 * gdbreplay.c (gdbreplay_version): Update copyright year.
13992 * server.c (gdbserver_version): Likewise.
13993
f21cc1a2 139942009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13995
13996 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13997 (handle_extended_wait): Improve comment.
0e21c1ec 13998
bca929d3
DE
139992008-12-13 Doug Evans <dje@google.com>
14000
14001 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14002 * server.h (ATTR_MALLOC): New macro.
14003 (xmalloc,xcalloc,xstrdup): Declare.
14004 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14005 * inferiors.c: Ditto.
14006 * linux-low.c: Ditto.
14007 * mem-break.c: Ditto.
14008 * regcache.c: Ditto.
14009 * remote-utils.c: Ditto.
14010 * server.c: Ditto.
14011 * target.c: Ditto.
14012 * win32-low.c: Ditto.
14013
97438e3f
DE
140142008-12-12 Doug Evans <dje@google.com>
14015
896c7fbb
DE
14016 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14017 in debugging printf.
14018
97438e3f
DE
14019 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14020
e3b886f8
DE
140212008-12-09 Doug Evans <dje@google.com>
14022
14023 * linux-low.h (struct process_info): Delete member tid, unused.
14024 * thread-db.c (find_one_thread): Update.
14025 (maybe_attach_thread): Update.
14026
07e059b5
VP
140272008-12-02 Pedro Alves <pedro@codesourcery.com>
14028
889bf7c5
PA
14029 * target.h (struct target_ops): Add qxfer_osdata member.
14030 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14031 and dirent.h.
14032 (linux_qxfer_osdata): New functions.
14033 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14034 callback.
14035 * server.c (handle_query): Handle "qXfer:osdata:read:".
14036 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14037 (buffer_xml_printf): New functions.
14038 * server.h (struct buffer): New.
14039 (buffer_grow_str, buffer_grow_str0): New macros.
14040 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14041 (buffer_xml_printf): Declare.
07e059b5 14042
4cab47ab
DE
140432008-11-24 Doug Evans <dje@google.com>
14044
14045 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14046
f142445f
DJ
140472008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * server.c (handle_v_run): Always use the supplied argument list.
14050
d0107bb6 140512008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14052
d0107bb6
BW
14053 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14054 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14055
2c4ad781
TJB
140562008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14057
14058 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14059 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14060 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14061 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14062 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14063 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14064 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14065 XML target descriptions.
14066 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14067 when inferior is running on an ISA 2.05 or later processor. Add
14068 special case to return offset for full 64-bit slot of FPSCR when
14069 in 32-bits.
14070
dfb64f85
DJ
140712008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14072
14073 * Makefile.in (SFILES, clean): Added sparc64 files.
14074 (reg-sparc64.o, reg-sparc64.c): New.
14075 * configure.srv (sparc*-*-linux*): New configuration.
14076 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14077 syscall arguments for SPARC.
14078 (regsets_store_inferior_registers): Likewise.
14079 * linux-sparc-low.c: New file.
14080
66b6e1dd
DE
140812008-10-21 Doug Evans <dje@google.com>
14082
14083 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14084 (READLINE_DIR,READLINE_DEP): Delete.
14085 (INTERNAL_CFLAGS): Update.
14086 (LINTFLAGS): Update.
14087
9b710a42
PA
140882008-10-10 Pedro Alves <pedro@codesourcery.com>
14089
14090 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14091 whole argv from the last run, not just argv[0].
14092
5822d809
PA
140932008-09-08 Pedro Alves <pedro@codesourcery.com>
14094
14095 * regcache.c (new_register_cache): Return NULL if the register
14096 cache size isn't known yet.
14097 (free_register_cache): Avoid dereferencing a NULL regcache.
14098
74aac56f
DJ
140992008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * configure.srv: Merge MIPS and MIPS64.
14102
400b20f5
MR
141032008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14104
14105 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14106
677c5bb1
LM
141072008-08-18 Luis Machado <luisgpm@br.ibm.com>
14108
14109 * Makefile.in: Add required vsx dependencies.
14110
14111 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14112 Declare init_registers_powerpc_vsx32l.
14113 Declare init_registers_powerpc_vsx64l.
14114 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14115 (ppc_arch_setup): Check for VSX in hwcap.
14116 (ppc_fill_vsxregset): New function.
14117 (ppc_store_vsxregset): New function.
14118 Add new VSX entry in regset_info target_regsets.
14119
14120 * configure.srv: Add new VSX dependencies.
14121
a6f3e723
SL
141222008-08-12 Pedro Alves <pedro@codesourcery.com>
14123
14124 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14125 (remote_open): Set or clear transport_is_reliable.
14126 (putpkt_binary): Don't expect acks in noack mode.
14127 (getpkt): Don't send ack/nac in noack mode.
14128 * server.c (handle_general_set): Handle QStartNoAckMode.
14129 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14130 qSupported.
14131 (main): Reset noack_mode on every connection.
14132 * server.h (noack_mode): Declare.
14133
a417dc56
RW
141342008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14135
14136 * Makefile.in (GDBREPLAY_OBS): New variable.
14137 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14138
3221518c
UW
141392008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14140 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14143 (usr_store_inferior_registers): Likewise.
14144 (regsets_store_inferior_registers): Likewise.
14145
ec56be1b
PA
141462008-07-31 Rolf Jansen <rj@surtec.com>
14147 Pedro Alves <pedro@codesourcery.com>
14148
14149 * configure.ac: Check for memmem declaration.
14150 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14151 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14152 (disable_packet_qfThreadInfo): Unconditionally compile.
14153 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14154 * configure, config.in: Regenerate.
14155
2fe5e3ff
DE
141562008-07-28 Doug Kwan <dougkwan@google.com>
14157
14158 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14159 (linux_write_memory): Remove declaration of errno.
14160
836acd6d
UW
141612008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14162
14163 * linux-low.c (handle_extended_wait): Do not use "status"
14164 variable uninitialized.
14165
aeba519e
PA
141662008-07-07 Pedro Alves <pedro@codesourcery.com>
14167
14168 * server.c (handle_v_attach): Inhibit reporting dll changes.
14169
db42f210
PA
141702008-06-27 Pedro Alves <pedro@codesourcery.com>
14171
14172 * remote-utils.c (prepare_resume_reply): If requested, don't
14173 output "thread:TID" in the T stop reply.
14174
14175 * server.c (disable_packet_vCont, disable_packet_Tthread)
14176 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14177 (handle_query): If requested, disable support for qC, qfThreadInfo
14178 and qsThreadInfo.
14179 (handle_v_requests): If requested, disable support for vCont.
14180 (gdbserver_show_disableable): New.
14181 (main): Handle --disable-packet and --disable-packet=LIST.
14182
14183 * server.h (disable_packet_vCont, disable_packet_Tthread)
14184 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14185
8e4c5421
CD
141862008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14187
14188 * server.c (gdbserver_usage): Mention --version.
14189
6e23a804
DJ
141902008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * Makefile.in (gdbreplay.o): New rule.
14193
90aa6a40
JM
141942008-06-06 Joseph Myers <joseph@codesourcery.com>
14195
14196 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14197 message, not gdbserver.
14198
c16158bc 141992008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14200 Nathan Sidwell <nathan@codesourcery.com>
14201 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14202
14203 * acinclude.m4: Include ../../config/acx.m4.
14204 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14205 * configure, config.in: Regenerate.
14206 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14207 * server.c (gdbserver_version): Print PKGVERSION.
14208 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14209 (main): Adjust gdbserver_usage calls.
14210 * gdbreplay.c (version, host_name): Add declarations.
14211 (gdbreplay_version, gdbreplay_usage): New.
14212 (main): Accept --version and --help options.
14213
aeb75bf5
DJ
142142008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14217 (arm_breakpoint_at): Handle Thumb.
14218 (the_low_target): Add comment.
14219
76b233dd
UW
142202008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14221
14222 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14223
08388c79
DE
142242008-05-09 Doug Evans <dje@google.com>
14225
a3c83fae
DE
14226 * server.h (decode_search_memory_packet): Declare.
14227 * remote-utils.c (decode_search_memory_packet): New fn.
14228 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14229 (handle_search_memory): New fn.
14230 (handle_query): Process qSearch:memory packets.
14231
bb9c3d36
UW
142322008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14233
14234 * regcache.c (registers_length): Remove.
14235 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14236 full register packet.
14237 * regcache.h (registers_length): Remove prototype.
14238 * server.h (PBUFSIZ): Define to 16384.
14239
7284e1be
UW
142402008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14241
14242 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14243 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14244 powerpc-64l.o, and powerpc-altivec64l.o.
14245 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14246 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14247 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14248 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14249 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14250 to srv_xmlfiles.
14251
14252 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14253 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14254 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14255 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14256 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14257 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14258 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14259 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14260 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14261 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14262 (clean): Update.
14263
14264 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14265 (init_registers_powerpc_32l): ... this new prototype.
14266 (init_registers_powerpc_32): Remove, replace by ...
14267 (init_registers_powerpc_altivec32l): ... this new prototype.
14268 (init_registers_powerpc_e500): Remove, replace by ...
14269 (init_registers_powerpc_e500l): ... this new prototype.
14270 (init_registers_ppc64): Remove, replace by ...
14271 (init_registers_powerpc_64l): ... this new prototype.
14272 (init_registers_powerpc_64): Remove, replace by ...
14273 (init_registers_powerpc_altivec64l): ... this new prototype.
14274 (ppc_num_regs): Set to 73.
14275 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14276 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14277 (ppc_cannot_store_register): Handle orig_r3 and trap.
14278 (ppc_arch_setup): Update init_registers_... calls.
14279 (ppc_fill_gregset): Handle orig_r3 and trap.
14280
14281 * inferiors.c (clear_inferiors): Reset current_inferior.
14282
fdc59709
PB
142832008-04-23 Paolo Bonzini <bonzini@gnu.org>
14284
889bf7c5
PA
14285 * acinclude.m4: Add override.m4.
14286 * configure: Regenerate.
fdc59709 14287
c9b2f845
UW
142882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14289
14290 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14291 initial call to init_register_ppc64.
14292
550512b8
UW
142932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14294
43aaf8b6
PA
14295 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14296 single powerpc*-*-linux* case.
550512b8
UW
14297 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14298
b6430ec3
UW
142992008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14300
14301 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14302 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14303 from reg_xmlfiles.
14304 * linux-ppc-low.c: Include <elf.h>.
14305 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14306 (ppc_hwcap): New global variable.
14307 (ppc_regmap): Remove __SPE__ #ifdef sections.
14308 (ppc_regmap_e500): New global variable.
14309 (ppc_cannot_store_register): Update __SPE__ special case.
14310 (ppc_get_hwcap): New function.
14311 (ppc_arch_setup): Use it to determine whether inferior supports
14312 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14313 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14314 Do not access registers if target does not support AltiVec.
14315 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14316 Do not access registers if target does not support SPE.
14317 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14318
52fa2412
UW
143192008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * linux-low.c (disabled_regsets, num_regsets): New.
14322 (use_regsets_p): Delete.
14323 (linux_wait_for_process): Clear disabled_regsets.
14324 (regsets_fetch_inferior_registers): Check and set it.
14325 (regsets_store_inferior_registers): Likewise.
14326 (linux_fetch_registers, linux_store_registers): Do not use
14327 use_regsets_p.
14328 (initialize_low): Allocate disabled_regsets.
14329
e28b3332
DJ
143302008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * Makefile.in (LIBOBJS): New.
14333 (OBS): Use LIBOBJS.
14334 (memmem.o): New rule.
14335 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14336 * configure: Regenerated.
14337
4536995d
UW
143382008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14339
14340 * server.c (handle_query): Never return "unsupported" for
14341 qXfer:features:read queries.
14342
221c031f
UW
143432008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14344
14345 * server.c (get_features_xml): Fix inverted condition.
14346 (handle_query): Always support qXfer:feature:read.
14347
ccd213ac
DJ
143482008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * server.c (wrapper_argv): New.
14351 (start_inferior): Handle wrapper_argv. If set, expect an extra
14352 trap.
14353 (gdbserver_usage): Document --wrapper.
14354 (main): Parse --wrapper.
14355
6fe305f7
UW
143562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14357
14358 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14359 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14360 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14361 (ppc_set_pc): Likewise.
14362 (ppc_arch_setup): New function.
14363 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14364 of collect_register.
889bf7c5 14365 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14366
5b0a002e
UW
143672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14368
14369 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14370 instead of linux-ppc64-low.o.
14371 * linux-ppc64-low.c: Remove file.
14372 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14373 (linux-ppc64-low.o): Remove rule.
14374
14375 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14376 (init_registers_powerpc_64): Likewise.
14377 (ppc_regmap): Conditionally define depending on __powerpc64__.
14378 (ppc_cannot_store_register): Do not special-case "fpscr" when
14379 compiled on __powerpc64__.
14380 (ppc_collect_ptrace_register): New function.
14381 (ppc_supply_ptrace_register): New function.
14382 (ppc_breakpoint): Change type to "unsigned int".
14383 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14384 (the_low_target): Conditionally provide initializers for the
889bf7c5 14385 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14386 collect_ptrace_register and supply_ptrace_register members.
14387
9b4b61c8
UW
143882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14389
14390 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14391 * server.c (gdbserver_xmltarget): Define.
14392 (get_features_xml): Use it to replace "target.xml" and arch_string.
14393
14394 * configure.srv: Remove srv_xmltarget. Add XML files that were
14395 mentioned there to srv_xmlfiles instead. Remove conditional tests
14396 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14397 srv_xmlfiles and srv_regobj to include all possible choices.
14398 * configure.ac (srv_xmltarget): Remove.
14399 (srv_xmlfiles): Do not add "target.xml".
14400 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14401 checks for supplementary target information.
14402 * configure: Regenerate.
14403 * Makefile.in (XML_TARGET): Remove.
14404 (target.xml): Remove rule.
14405 (clean): Do not clean up target.xml.
14406 (.PRECIOUS): Do not mention target.xml.
14407
14408 * target.h (struct target_ops): Remove arch_string member.
14409 * linux-low.c (linux_arch_string): Remove.
14410 (linux_target_ops): Remove arch_string initializer.
14411 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14412 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14413 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14414 * spu-low.c (spu_arch_string): Remove.
14415 (spu_target_ops): Remove arch_string initializer.
14416 * win32-low.c (win32_arch_string): Remove.
14417 (win32_target_ops): Remove arch_string initializer.
14418 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14419 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14420 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14421
ee1a7ae4
UW
144222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14423
14424 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14425 by collect_ptrace_register and supply_ptrace_register hooks.
14426 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14427 instead of checking for the_low_target.left_pad_xfer.
14428 (usr_store_inferior_registers): Use collect_ptrace_register callback
14429 instead of checking for the_low_target.left_pad_xfer.
14430
14431 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14432 (s390_supply_ptrace_register): Likewise.
14433 (s390_fill_gregset): Call s390_collect_ptrace_register.
14434 (the_low_target): Update.
14435
14436 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14437 (ppc_supply_ptrace_register): Likewise.
14438 (the_low_target): Update.
14439
14440 * linux-i386-low.c (the_low_target): Update.
14441 * linux-x86-64-low.c (the_low_target): Update.
14442
d61ddec4
UW
144432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14444
14445 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14446 reg-s390.o and reg-s390x.o.
14447
14448 * linux-low.c (new_inferior): New global variable.
14449 (linux_create_inferior, linux_attach): Set it.
14450 (linux_wait_for_process): Call the_low_target.arch_setup after the
14451 target has stopped for the first time.
14452 (initialize_low): Do not call the_low_target.arch_setup.
14453
14454 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14455 (s390_set_pc): Likewise.
14456 (s390_arch_setup): New function.
14457 (the_low_target): Use s390_arch_setup as arch_setup routine.
14458
14459 * regcache.c (realloc_register_cache): New function.
14460 (set_register_cache): Call it for each existing regcache.
14461
d05b4ac3
UW
144622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14463
14464 * server.h (init_registers): Remove prototype.
14465
14466 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14467 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14468 instead of init_registers ().
14469 * linux-arm-low.c (init_registers_arm): Add prototype.
14470 (init_registers_arm_with_iwmmxt): Likewise.
14471 (the_low_target): Add initializer for arch_setup field.
14472 * linux-cris-low.c (init_registers_cris): Add prototype.
14473 (the_low_target): Add initializer for arch_setup field.
14474 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14475 (the_low_target): Add initializer for arch_setup field.
14476 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14477 (the_low_target): Add initializer for arch_setup field.
14478 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14479 (the_low_target): Add initializer for arch_setup field.
14480 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14481 (the_low_target): Add initializer for arch_setup field.
14482 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14483 (the_low_target): Add initializer for arch_setup field.
14484 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14485 (init_registers_mips64_linux): Likewise.
14486 (the_low_target): Add initializer for arch_setup field.
14487 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14488 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14489 (the_low_target): Add initializer for arch_setup field.
14490 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14491 (init_registers_powerpc_64): Likewise.
14492 (the_low_target): Add initializer for arch_setup field.
14493 * linux-s390-low.c (init_registers_s390): Add prototype.
14494 (init_registers_s390x): Likewise.
14495 (the_low_target): Add initializer for arch_setup field.
14496 * linux-sh-low.c (init_registers_sh): Add prototype.
14497 (the_low_target): Add initializer for arch_setup field.
14498 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14499 (the_low_target): Add initializer for arch_setup field.
14500 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14501 (the_low_target): Add initializer for arch_setup field.
14502
14503 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14504 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14505 instead of init_registers ().
14506 * win32-arm-low.c (init_registers_arm): Add prototype.
14507 (the_low_target): Add initializer for arch_setup field.
14508 * win32-i386-low.c (init_registers_i386): Add prototype.
14509 (the_low_target): Add initializer for arch_setup field.
14510
14511 * spu-low.c (init_registers_spu): Add prototype.
14512 (initialize_low): Call initialie_registers_spu () instead of
14513 initialize_registers ().
14514
fd96d250
PA
145152008-02-19 Pedro Alves <pedro@codesourcery.com>
14516
14517 * server.c (handle_v_requests): When handling the vRun and vAttach
14518 packets, if already debugging a process, don't kill it. Return an
14519 error instead.
14520
d41b6bb4
DJ
145212008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * server.c (handle_query): Correct length check.
14524
5ac588cf
PA
145252008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14526
14527 * win32-low.c (do_initial_child_stuff): Add process handle
14528 parameter. Set current_process_handle and current_process_id from the
14529 parameters. Clear globals.
14530 (win32_create_inferior): Don't set current_process_handle and
14531 current_process_id here. Instead pass them on the call to
14532 do_initial_child_stuff.
14533 (win32_attach): Likewise.
14534 (win32_clear_inferiors): New.
14535 (win32_kill): Don't close the current process handle or the
14536 current thread handle here. Instead call win32_clear_inferiors.
14537 (win32_detach): Don't open a new handle to the process. Call
14538 win32_clear_inferiors.
14539 (win32_join): Don't rely on current_process_handle; open a new
14540 handle using the process id.
14541 (win32_wait): Call win32_clear_inferiors when the inferior process
14542 has exited.
14543
ecd7ecbc
DJ
145442008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * server.c (monitor_show_help): Add "exit".
14547
1525d545
MG
145482008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14549
ecd7ecbc 14550 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14551 (clean): Add reg-xtensa.c.
14552 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14553 * configure.srv (xtensa*-*-linux*) New target.
14554 * linux-xtensa-low.c: New.
14555 * xtensa-xtregs.c: New.
1525d545 14556
59a016f0
PA
145572008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14558
14559 * hostio.c: Don't include errno.h.
14560 (errno_to_fileio_errno): Move to hostio-errno.
14561 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14562 error number outputting to the target->hostio_last_error callback.
14563 (hostio_packet_error): Use FILEIO_EINVAL directly.
14564 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14565 calls to hostio_error.
14566 * hostio-errno.c: New.
14567 * server.h (hostio_last_error_from_errno): Declare.
14568 * target.h (target_ops): Add hostio_last_error member.
14569 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14570 as hostio_last_error handler.
889bf7c5 14571 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14572 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14573 (wince_hostio_last_error): New functions.
14574 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14575 as hostio_last_error handler.
14576 (win32_target_ops) [!_WIN32_WCE]: Register
14577 hostio_last_error_from_errno as hostio_last_error handler.
14578 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14579 (hostio-errno.o): New rule.
14580 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14581 * configure.srv (srv_hostio_err_objs): New variable. Default to
14582 hostio-errno.o.
14583 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14584 * configure: Regenerate.
14585
2d717e4f
DJ
145862008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14589 (linux_kill, linux_detach): Clean up the process list.
14590 * remote-utils.c (remote_open): Improve port number parsing.
14591 (putpkt_binary, input_interrupt): Only send interrupts if the target
14592 is running.
14593 * server.c (extended_protocol): Make static.
14594 (attached): Define earlier.
14595 (exit_requested, response_needed, program_argv): New variables.
14596 (target_running): New.
14597 (start_inferior): Clear attached here.
14598 (attach_inferior): Set attached here.
14599 (require_running): Define.
14600 (handle_query): Use require_running and target_running. Implement
14601 "monitor exit".
14602 (handle_v_attach, handle_v_run): New.
14603 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14604 (gdbserver_usage): Update.
14605 (main): Redo argument parsing. Handle --debug and --multi. Handle
14606 --attach along with other options or after the port. Save
14607 program_argv. Support no initial program. Resynchronize
14608 communication with GDB after an error. Handle "monitor exit".
14609 Use require_running and target_running. Always allow the extended
14610 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14611 restart in extended mode.
14612 * README: Refer to the GDB manual. Update --attach usage.
14613
7407e2de
AS
146142007-12-20 Andreas Schwab <schwab@suse.de>
14615
14616 * linux-low.c (STACK_SIZE): Define.
14617 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14618 (linux_test_for_tracefork): Likewise.
14619
b65d95c5
DJ
146202007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * linux-low.c (linux_wait_for_event): Update messages. Do not
14623 reinsert auto-delete breakpoints.
14624 * mem-break.c (struct breakpoint): Change return type of handler to
14625 int.
14626 (set_breakpoint_at): Update handler type.
14627 (reinsert_breakpoint_handler): Return 1 instead of calling
14628 delete_breakpoint.
14629 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14630 setting a new one.
14631 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14632 * mem-break.h (set_breakpoint_at): Update handler type.
14633 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14634 * win32-low.c (auto_delete_breakpoint): New.
14635 (get_child_debug_event): Use it.
14636
4e799345
DJ
146372007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * configure.ac: Check for pread and pwrite.
14640 * hostio.c (handle_pread): Fall back to lseek and read.
14641 (handle_pwrite): Fall back to lseek and write.
14642 * config.in, configure: Regenerated.
14643
27524b67
DJ
146442007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * server.c (myresume): Add own_buf argument.
14647 (main): Update calls.
14648
a20d5e98
DJ
146492007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14650
14651 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14652 * remote-utils.c (remote_open): Do not call disable_async_io.
14653 (block_async_io): Delete.
14654 (unblock_async_io): Make static.
14655 (initialize_async_io): New.
14656 * server.c (handle_v_cont): Handle async I/O here.
14657 (myresume): Likewise. Move other common resume tasks here...
14658 (main): ... from here. Call initialize_async_io. Disable async
14659 I/O before the main loop.
14660 * server.h (initialize_async_io): Declare.
14661 (block_async_io, unblock_async_io): Delete prototypes.
14662 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14663
b79d787e
DJ
146642007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14665
14666 * remote-utils.c (readchar): Allow binary data in received messages.
14667
d97903b2
PA
146682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14669
14670 * win32-low.c (attaching): New global.
14671 (win32_create_inferior): Clear the `attaching' global.
14672 (win32_attach): Set the `attaching' global.
14673 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14674 attaching. Only set a breakpoint at the entry point if not
14675 attaching.
14676
311de423
PA
146772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14678
14679 * server.c (main): Don't report dll events on the initial
14680 connection on attaches.
14681
6c2d16d2
PA
146822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14683
14684 * server.c (main): Relax numerical bases supported for the pid of
14685 the --attach command line argument.
14686
5ca906e6
PA
146872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14688
14689 * win32-low.c (win32_attach): Call OpenProcess before
14690 DebugActiveProcess, not after. Add last error output to error
14691 call.
14692
9c6c8194
PA
146932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14694
14695 * win32-low.c (win32_get_thread_context)
14696 (win32_set_thread_context): New functions.
14697 (thread_rec): Use win32_get_thread_context.
14698 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14699 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14700 field.
14701
4d5d1aaa
PA
147022007-12-03 Leo Zayas
14703 Pedro Alves <pedro_alves@portugalmail.pt>
14704
14705 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14706 global variables.
14707 (child_add_thread): Minor cleanup.
14708 (child_continue): Resume artificially suspended threads before
14709 calling ContinueDebugEvent.
14710 (suspend_one_thread): New.
14711 (fake_breakpoint_event): New.
14712 (get_child_debug_event): Change return type to int. Check here if
14713 gdb sent an interrupt request. If a soft interrupt was requested,
14714 fake a breakpoint event. Return 0 if there is no event to handle,
14715 and 1 otherwise.
14716 (win32_wait): Don't check here if gdb sent an interrupt request.
14717 Ensure there is a valid event to handle.
14718 (win32_request_interrupt): Add soft interruption method as last
14719 resort.
14720
c436e841
PA
147212007-12-03 Leo Zayas
14722 Pedro Alves <pedro_alves@portugalmail.pt>
14723
14724 * win32-low.h (win32_thread_info): Add descriptions to the
14725 structure members. Replace `suspend_count' counter by a
14726 `suspended' flag.
14727 * win32-low.c (thread_rec): Update condition of when to get the
14728 context from the inferior. Rely on ContextFlags being set if it
14729 has already been retrieved. Only suspend the inferior thread if
14730 we haven't already. Warn if that fails.
14731 (continue_one_thread): s/suspend_count/suspended/. Only call
14732 ResumeThread once. Warn if that fails.
14733
e7b5fa67
PA
147342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * win32-low.c (win32_wait): Don't read from the inferior when it
14737 has already exited.
14738
a385171d
PA
147392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14740
14741 * Makefile.in (win32_low_h): New variable.
14742 (win32-low.o): Add dependency on $(win32_low_h).
14743 (win32-arm-low.o, win32-i386-low.o): New rules.
14744
f80c84b3
DJ
147452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14746
14747 * hostio.c: Correct copyright year.
14748
a6b151f1
DJ
147492007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14750
14751 * Makefile.in (OBS): Add hostio.o.
14752 (hostio.o): New rule.
14753 * server.h (handle_vFile): Declare.
14754 * hostio.c: New file.
14755 * server.c (handle_v_requests): Take packet_len and new_packet_len
14756 for binary packets. Call handle_vFile.
14757 (main): Update call to handle_v_requests.
14758
f9387fc3
DJ
147592007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * linux-low.c: Include <sched.h>.
14762
51c2684e
DJ
147632007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * linux-low.c (linux_tracefork_grandchild): New.
14766 (linux_tracefork_child): Use clone.
14767 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14768
75f83163
JB
147692007-10-31 Joel Brobecker <brobecker@adacore.com>
14770
14771 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14772
da5898ce
DJ
147732007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14776
24a09b5f
DJ
147772007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * inferiors.c (change_inferior_id): Delete.
14780 (add_pid_to_list, pull_pid_from_list): New.
14781 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14782 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14783 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14784 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14785 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14786 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14787 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14788 (using_threads): Always set to 1.
14789 (handle_extended_wait): New.
14790 (add_process): Do not set TID.
14791 (linux_create_inferior): Set must_set_ptrace_flags.
14792 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14793 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14794 (linux_thread_alive): Rename TID argument to LWPID.
14795 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14796 (linux_wait_for_event): Do not use TID or check using_threads. Update
14797 call to dead_thread_notify. Call handle_extended_wait.
14798 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14799 (send_sigstop): Delete sigstop_sent.
14800 (wait_for_sigstop): Avoid TID.
14801 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14802 (linux_test_for_tracefork): New.
14803 (linux_lookup_signals): Use thread_db_active and
14804 linux_supports_tracefork_flag.
14805 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14806 * linux-low.h (get_process_thread): Avoid TID.
14807 (struct process_ifo): Move thread_known and tid to the end. Remove
14808 sigstop_sent.
14809 (linux_attach_lwp, thread_db_init): Update prototypes.
14810 * server.h (change_inferior_id): Delete prototype.
14811 (add_pid_to_list, pull_pid_from_list): New prototypes.
14812 * thread-db.c (thread_db_use_events): New.
14813 (find_first_thread): Rename to...
14814 (find_one_thread): ...this. Update callers and messages. Do not
14815 call fatal. Check thread_db_use_events. Do not call
14816 change_inferior_id or new_thread_notify.
14817 (maybe_attach_thread): Update. Do not call new_thread_notify.
14818 (thread_db_init): Set thread_db_use_events. Check use_events.
14819 * utils.c (fatal, warning): Correct message prefix.
14820
30ed0a8f
DJ
148212007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * Makefile.in (clean): Remove new files.
14824 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14825 (powerpc-64.o, powerpc-64.c): New rules.
14826 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14827 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14828 with SPE.
14829 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14830 SPE targets.
14831 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14832 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14833 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14834 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14835 (target_regsets): Add AltiVec and SPE register sets.
14836 * configure.ac: Check for AltiVec and SPE.
14837 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14838 (ppc_fill_vrregset, ppc_store_vrregset): New.
14839 (target_regsets): Add AltiVec register set.
14840 * configure: Regenerated.
14841
fd462a61
DJ
148422007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14843
14844 * linux-low.c (O_LARGEFILE): Define.
14845 (linux_read_memory): Use /proc/PID/mem.
14846 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14847 * configure, config.in: Regenerated.
14848
69f223ed
DJ
148492007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14850
14851 * linux-low.c (linux_wait_for_event): Do not pass signals while
14852 single-stepping.
14853
aec18585
PA
148542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14855
14856 * win32-low.c (create_process): New.
14857 (win32_create_inferior): Use create_process instead of
14858 CreateProcess. If create_process failed retry appending an ".exe"
14859 suffix. Store the GetLastError result immediatelly after
14860 create_process calls and use it on the call to error.
14861
34d86ddd
PA
148622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14863
14864 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14865
5a0e3bd0
JB
148662007-08-23 Joel Brobecker <brobecker@adacore.com>
14867
14868 * configure.ac: Switch license to GPLv3.
14869
f88c79e6
MS
148702007-08-01 Michael Snyder <msnyder@access-company.com>
14871
14872 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14873
6b3d9b83
PA
148742007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14875
14876 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14877 typedef.
14878 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14879 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14880 CloseToolhelp32Snapshot.
14881 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14882 CloseToolhelp32Snapshot.
14883
c588c53c
MS
148842007-07-27 Michael Snyder <michael.snyder@access-company.com>
14885
14886 * server.c (main): Check for inferior exit before main loop.
14887
aa0403d9
PA
148882007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14891 instead of on tmp_desc.
14892
255e7678
DJ
148932007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14894 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14897 (add_thread): Minor cleanups.
14898 (clear_inferiors): Move lower in the file. Clear the DLL
14899 list.
14900 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14901 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14902 (xml_escape_text): New.
14903 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14904 for qSupported.
14905 (handle_v_cont): Report errors.
14906 (gdbserver_version): Update.
14907 (main): Correct size of own_buf. Do not report initial DLL events.
14908 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14909 (unloaded_dll, xml_escape_text): New.
14910 * win32-low.c (enum target_waitkind): Update comments.
14911 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14912 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14913 (win32_EnumProcessModules, win32_GetModuleInformation)
14914 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14915 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14916 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14917 (win32_Module32First, win32_Module32Next, load_toolhelp)
14918 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14919 (get_child_debug_event): Handle DLL events.
14920 (win32_wait): Likewise.
14921
0d37add9
DJ
149222007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14923
14924 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14925 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14926
45e2715e
PA
149272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14928
14929 * win32-low.c (handle_output_debug_string): Ignore event if not
14930 waiting.
14931
c5674cf1
PA
149322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14933
14934 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14935
2bbe3cc1
DJ
149362007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14939
ae13219e
DJ
149402007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * inferiors.c (change_inferior_id): Add comment.
14943 * linux-low.c (check_removed_breakpoint): Add an early
14944 prototype. Improve debug output.
14945 (linux_attach): Doc update.
14946 (linux_detach_one_process, linux_detach): Clean up before releasing
14947 each process.
14948 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14949 * linux-low.h (struct process_info): Doc improvement.
14950 * mem-break.c (delete_all_breakpoints): New.
14951 * mem-break.h (delete_all_breakpoints): New prototype.
14952 * thread-db.c (find_first_thread): New.
14953 (thread_db_create_event): Call it instead of
14954 thread_db_find_new_threads. Clean up unused variables.
14955 (maybe_attach_thread): Remove first thread handling.
14956 (thread_db_find_new_threads): Use find_first_thread.
14957 (thread_db_get_tls_address): Likewise.
14958
4105de34
DJ
149592007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * thread-db.c (thread_db_find_new_threads): Add prototype.
14962 (thread_db_create_event): Check for the main thread before adding
14963 a new thread.
14964 (maybe_attach_thread): Only enable event reporting if TID == 0.
14965 (thread_db_get_tls_address): Check for new threads.
14966
2b876972
DJ
149672007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14968
14969 * linux-low.c (linux_create_inferior): Try execv before execvp.
14970 * spu-low.c (spu_create_inferior): Likewise.
14971
7a245884
DJ
149722007-06-13 Mike Frysinger <vapier@gentoo.org>
14973
14974 * linux-low.c (linux_create_inferior): Change execv to execvp.
14975 * spu-low.c (spu_create_inferior): Likewies.
14976
117ce543
DJ
149772007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * Makefile.in (clean): Clean new files instead of deleted ones.
14980 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14981 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14982 rules.
14983 * configure.srv: Specify XML files and new regformats for MIPS and
14984 MIPS64 GNU/Linux.
14985 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14986 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14987 an entry for the restart register.
14988 (mips_cannot_fetch_register, mips_cannot_store_register)
14989 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14990 register names to match the XML descriptions.
14991 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14992 restart register instead of $0.
14993
0e7f50da
UW
149942007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14995 Markus Deuling <deuling@de.ibm.com>
14996
14997 * remote-utils.c (decode_xfer_write): New function.
14998 * server.h (decode_xfer_write): Add prototype.
14999 * server.c (handle_query): Add PACKET_LEN argument. Support
15000 qXfer:spu:read and qXfer:spu:write packets.
15001 (main): Pass packet_len to handle_query.
15002 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15003 * target.h (target_ops): Add qxfer_spu.
15004
374c1d38
UW
150052007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15006
15007 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15008 accessing non-seekable spufs files.
15009
bb63802a
UW
150102007-05-16 Markus Deuling <deuling@de.ibm.com>
15011
889bf7c5 15012 * server.c (handle_query): Add reply for qC packet.
bb63802a 15013
7390519e
PA
150142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15015 Leo Zayas <lerele@champenstudios@com>
15016
15017 * server.h (check_remote_input_interrupt_request): New function.
15018 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15019 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15020 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15021 (check_remote_input_interrupt_request): New function.
15022 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15023 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15024 winapi_GenerateConsoleCtrlEvent): New typedefs.
15025 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15026 to 250 ms.
15027 (win32_wait): Check for remote interrupt request
15028 with check_remote_input_interrupt_request.
15029 (win32_request_interrupt): New function.
15030 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15031
34b34921
PA
150322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15033
15034 * win32-low.c (debug_registers_changed,
15035 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15036 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15037 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15038 (thread_rec): Get context using the low target.
15039 (child_add_thread): Call thread_added on the low target,
15040 which does the same thing.
15041 (regptr): Delete.
15042 (do_initial_child_stuff): Remove debug registers references.
15043 Set context using the low target. Resume threads after
15044 setting the contexts.
15045 (child_continue): Remove dead variable. Remove debug
15046 registers references.
15047 (child_fetch_inferior_registers): Go through the low target.
15048 (do_child_store_inferior_registers): Remove.
15049 (child_store_inferior_registers): Go through the low target.
15050 (win32_resume): Remove debug registers references.
15051 Set context using the low target.
15052 (handle_exception): Change return type to void. Don't record
15053 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15054 first chance exception.
889bf7c5 15055 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15056 goto loop. Always return after waiting for debug event.
15057 (win32_wait): Convert to switch statement. Handle spurious
15058 events.
15059
15060 * win32-i386-low.c (debug_registers_changed,
15061 debug_registers_used): New.
15062 (initial_stuff): Rename to ...
15063 (i386_initial_stuff): ... this. Clear debug registers
15064 state variables.
15065 (store_debug_registers): Delete.
15066 (i386_get_thread_context): New.
15067 (load_debug_registers): Delete.
15068 (i386_set_thread_context): New.
15069 (i386_thread_added): New.
15070 (single_step): Rename to ...
15071 (i386_single_step): ... this.
15072 (do_fetch_inferior_registers): Rename to ...
15073 (i386_fetch_inferior_register): ... this.
15074 (i386_store_inferior_register): New.
15075 (the_low_target): Adapt to new interface.
15076
15077 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15078 (arm_get_thread_context): New.
15079 (arm_set_thread_context): New.
15080 (regptr): New.
15081 (do_fetch_inferior_registers): Rename to ...
15082 (arm_fetch_inferior_register): ... this.
15083 (arm_store_inferior_register): New.
15084 (arm_wince_breakpoint): Reimplement as unsigned long.
15085 (arm_wince_breakpoint_len): Define.
15086 (the_low_target): Adapt to new interface.
15087
15088 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15089 load_debug_registers. Add get_thread_context, set_thread_context,
15090 thread_added and store_inferior_register. Rename
15091 fetch_inferior_registers to fetch_inferior_register.
15092 (regptr): Remove declaration.
15093
dd6953e1
PA
150942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15095
15096 * linux-low.c (linux_detach): Change return type to int. Return 0.
15097 * spu-low.c (spu_detach): Likewise.
15098
444d6139
PA
150992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15100
15101 * target.h (target_ops): Change return type of detach to int.
15102 Add join.
15103 (join_inferior): New.
15104 * server.c (main): Don't skip detach support on mingw32.
15105 If the inferior doesn't support detaching return error.
15106 Call join_inferior instead of using waitpid.
15107 * linux-low.c (linux_join): New.
15108 (linux_target_op): Add linux_join.
15109 * spu-low.c (spu_join): New.
15110 (spu_target_ops): Add spu_join.
15111 * win32-low.c (win32_detach): Adapt to new interface.
15112 Reopen current_process_handle before detaching. Issue a child
15113 resume before detaching.
15114 (win32_join): New.
15115 (win32_target_op): Add win32_join.
15116
1d5315fe
PA
151172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15118
15119 * win32-low.c (win32-attach): Fix return value.
15120 * target.h (target_ops): Describe ATTACH return values.
15121
bf914831
PA
151222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15123
15124 * win32-low.c (GETPROCADDRESS): Define.
15125 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15126 (winapi_DebugSetProcessKillOnExit): Likewise.
15127 (win32_create_inferior): Force usage of ansi CreateProcessA.
15128 (win32_attach): Use GETPROCADDRESS.
15129 (win32_detach): Likewise.
15130
f72f3e60
PA
151312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15132
15133 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15134
ed50f18f
PA
151352007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15136
15137 * win32-low.c: Commit leftover changes from 2007-03-29.
15138
0c2ead7e
DJ
151392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15140
15141 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15142 fields short instead of int. Add explicit padding.
15143 (i387_cache_to_fsave): Remove unnecessary casts.
15144 (i387_fsave_to_cache): Doc fix.
15145 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15146
73725ff3
DJ
151472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15148
15149 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15150 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15151
d99f33d8
PA
151522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15153
15154 * configure.srv (arm*-*-mingw32ce*): Move near the other
15155 arm targets.
15156
68070c10
PA
151572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15158
2482afc6 15159 * configure.ac: Add errno checking.
68070c10
PA
15160 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15161 sys/file.h and malloc.h.
15162 (AC_CHECK_DECLS): Add perror.
15163 (srv_mingwce): Handle.
2482afc6 15164 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15165 win32-i386-low.o to srv_tgtobj.
15166 (i[34567]86-*-mingw*): Likewise.
15167 (arm*-*-mingw32ce*): Add case.
15168 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15169 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15170 [__MINGW32CE__] (strerror): New function.
15171 [__MINGW32CE__] (errno): Define to GetLastError.
15172 [__MINGW32CE__] (COUNTOF): New macro.
15173 (remote_open): Remove extra close call.
15174 * mem-break.c (delete_breakpoint_at): New function.
15175 * mem-break.h (delete_breakpoint_at): Declare.
15176 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15177 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15178 [USE_WIN32API] (read, write): Add char* casts.
15179 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15180 * server.h: Include wincecompat.h on Windows CE.
15181 [HAVE_ERRNO_H]: Check.
15182 (perror): Declare if not declared.
15183 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15184 (perror_with_name): Remove errno declaration.
15185 * wincecompat.h: New.
15186 * wincecompat.c: New.
15187 * win32-low.h: New.
15188 * win32-arm-low.c: New.
15189 * win32-i386-low.c: New.
15190 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15191 (OUTMSG2): Make it safe.
15192 (_T): New macro.
15193 (COUNTOF): New macro.
15194 (NUM_REGS): Get it from the low target.
15195 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15196 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15197 (thread_rec): Let low target handle debug registers.
15198 (child_add_thread): Likewise.
15199 (child_init_thread_list): Likewise.
15200 (continue_one_thread): Likewise.
15201 (regptr): New.
15202 (do_child_fetch_inferior_registers): Move to ...
15203 * win32-i386-low.c: ... here, and rename to ...
15204 (do_fetch_inferior_registers): ... this.
889bf7c5 15205 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15206 Go through the low target.
15207 (do_child_store_inferior_registers): Use regptr.
15208 (strwinerror): New function.
15209 (win32_create_inferior): Handle Windows CE.
15210 Use strwinerror instead of strerror on Windows error
15211 codes. Add program to the error output.
15212 Don't close the main thread handle on Windows CE.
15213 (win32_attach): Use coredll.dll on Windows CE.
15214 (win32_kill): Close current process and current
15215 thread handles.
15216 (win32_detach): Use coredll.dll on Windows CE.
15217 (win32_resume): Let low target handle debug registers, and
15218 step request.
15219 (handle_exception): Add/Remove initial breakpoint. Avoid
15220 non-existant WSTOPSIG on Windows CE.
15221 (win32_read_inferior_memory): Cast to remove warning.
15222 (win32_arch_string): Go through the low target.
15223 (initialize_low): Call set_breakpoint_data with the low
15224 target's breakpoint.
15225 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15226 FOP_REGNUM, mappings): Move to ...
15227 * win32-i386-low.c: ... here.
15228 * win32-low.c (win32_thread_info): Move to ...
15229 * win32-low.h: ... here.
15230 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15231 win32-arm-low.c and wincecompat.c.
15232 (all:): Add $EXEEXT.
15233 (install-only:): Likewise.
15234 (gdbserver:): Likewise.
15235 (gdbreplay:): Likewise.
15236 * config.in: Regenerate.
15237 * configure: Regenerate.
15238
41093d81
PA
152392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15240
15241 * win32-low.c: Rename typedef thread_info to
15242 win32_thread_info throughout.
15243
544afa54
PA
152442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15245
15246 * win32-i386-low.c: Rename to ...
15247 * win32-low.c: ... this.
15248 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15249 * Makefile.in: Likewise.
15250
bce7165d
PA
152512007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15252
15253 * remote-utils.c (monitor_output): Constify msg parameter.
15254 * server.h (monitor_output): Likewise.
15255 * win32-i386-low.c (handle_output_debug_string): New.
15256 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15257 handle_output_debug_string.
15258 (get_child_debug_event): Likewise.
15259
506c7aa0
DJ
152602007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15261
15262 * server.c (main): Correct strtoul check.
15263
42c81e2a
DJ
152642007-03-27 Jon Ringle <jon@ringle.org>
15265
15266 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15267
9453113a
DJ
152682007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15269
15270 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15271
64a69107
DJ
152722007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * terminal.h: Check HAVE_SGTTY_H.
15275
152762007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15277
15278 * remote-utils.c (remote_open): Print out the assigned port number.
15279
c74d0ad8
DJ
152802007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * remote-utils.c (monitor_output): New function.
15283 * server.c (debug_threads): Define here.
15284 (monitor_show_help): New function.
15285 (handle_query): Handle qRcmd.
15286 (main): Do not handle 'd' packet.
15287 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15288 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15289 of debug_threads.
15290
de7c3b4a
PA
152912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15292
15293 * Makefile.in (EXEEXT): New.
15294 (clean): Use $(EXEEXT).
15295
ef57601b
PA
152962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15297
15298 * target.h (target_ops): Rename send_signal to request_interrupt,
15299 and remove enum target_signal parameter.
15300 * linux-low.c (linux_request_interrupt): Rename from
15301 linux_send_signal, and always send SIGINT.
15302 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15303 and always send SIGINT.
15304 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15305 of send_signal.
15306 (input_interrupt): Likewise.
15307
820f2bda
PA
153082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15309
15310 * server.c (get_features_xml): Check if target implemented
15311 arch_string.
15312 * win32-i386-low.c (win32_arch_string): New.
15313 (win32_target_ops): Add win32_arch_string as arch_string member.
15314
ab39bf24
UW
153152007-02-22 Markus Deuling <deuling@de.ibm.com>
15316
15317 * spu-low.c (spu_arch_string): New.
15318 (spu_target_ops): Add spu_arch_string.
15319
61ff6e04
DJ
153202007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15323 * configure.ac: Do not check for terminal.h.
15324 * configure, config.in: Regenerated.
15325
fb1e4ffc
DJ
153262007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * Makefile.in (OBS): Add $(XML_BUILTIN).
15329 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15330 (clean): Update.
15331 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15332 (arm-with-iwmmxt.c): New.
15333 * config.in, configure: Regenerate.
15334 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15335 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15336 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15337 (arm*-*-linux*): Add iWMMXt and regset support.
15338 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15339 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15340 (arm_store_wmmxregset, target_regsets): New.
15341 * server.c (get_features_xml): Take annex argument. Check builtin
15342 XML documents.
15343 (handle_query): Handle multiple annexes.
15344
0f48aa01
DJ
153452007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15346
15347 * remote-utils.c [USE_WIN32API] (read, write): Define.
15348 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15349 write.
15350
23181151
DJ
153512007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15352
15353 * linux-i386-low.c (the_low_target): Set arch_string.
15354 * linux-x86-64-low.c (the_low_target): Likewise.
15355 * linux-low.c (linux_arch_string): New.
15356 (linux_target_ops): Add it.
15357 * linux-low.h (struct linux_target_ops): Add arch_string.
15358 * server.c (write_qxfer_response): Use const void * for DATA.
15359 (get_features_xml): New.
15360 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15361 * target.h (struct target_ops): Add arch_string method.
15362
9d606399
DJ
153632007-01-03 Denis Pilat <denis.pilat@st.com>
15364 Daniel Jacobowitz <dan@codesourcery.com>
15365
15366 * linux-low.c (linux_kill): Handle being called with no threads.
15367 * win32-i386-low.c (win32_kill): Likewise.
15368 (get_child_debug_event): Clear current_process_handle.
15369
153702006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15371 Daniel Jacobowitz <dan@codesourcery.com>
15372
15373 * remote-utils.c (remote_open): Check the type of specified
15374 serial port devices before opening them.
15375 * server.c (main): Kill the inferior if an error occurs during
15376 the first remote_open.
15377
a5e13d24
DJ
153782006-12-05 Markus Deuling <deuling@de.ibm.com>
15379
15380 * README: Update supported targets.
15381
186947f7
DJ
153822006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15383
15384 * Makefile.in (clean): Remove reg-mips64.c.
15385 (reg-mips64.c, reg-mips64.o): New rules.
15386 * configure.srv: Handle mips64. Include regset support for mips.
15387 * linux-mips-low.c (union mips_register): New.
15388 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15389 (mips_breakpoint, mips_breakpoint_at): Use int.
15390 (mips_collect_register, mips_supply_register)
15391 (mips_collect_register_32bit, mips_supply_register_32bit)
15392 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15393 (mips_store_fpregset, target_regsets): New.
15394 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15395
a13e2c95
UW
153962006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15397
15398 * configure.srv: Add target "spu*-*-*".
15399 * Makefile.in (clean): Remove reg-spu.c.
15400 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15401 * spu-low.c: New file.
15402
cb7283db
DJ
154032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15404
15405 * configure.ac: Correct td_thr_tls_get_addr test.
15406 * configure: Regenerated.
15407
89be2091
DJ
154082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * linux-low.c (linux_wait_for_event): Reformat. Use the
15411 pass_signals array.
15412 * remote-utils.c (decode_address_to_semicolon): New.
15413 * server.c (pass_signals, handle_general_set): New.
15414 (handle_query): Mention QPassSignals for qSupported.
15415 (main): Call handle_general_set.
15416 * server.h (pass_signals, decode_address_to_semicolon): New.
15417
000ef4f0
DJ
154182006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * server.c (handle_query): Correct error handling for read_auxv.
15421
b7149293
UW
154222005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15423
15424 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15425 and srv_linux_thread_db to yes.
15426 * linux-s390-low.c (s390_fill_gregset): New function.
15427 (target_regsets): Define data structure.
15428
dae5f5cf
DJ
154292006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15432 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15433 * config.in, configure: Regenerated.
15434 * inferiors.c (gdb_id_to_thread): New function.
15435 (gdb_id_to_thread_id): Use it.
15436 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15437 * linux-low.h (struct process_info): Add th member.
15438 (thread_db_get_tls_address): New prototype.
15439 * remote-utils.c (decode_address): Make non-static.
15440 * server.c (handle_query): Handle qGetTLSAddr.
15441 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15442 * target.h (struct target_ops): Add get_tls_address.
15443 * thread-db.c (maybe_attach_thread): Save the thread handle.
15444 (thread_db_get_tls_address): New.
15445
32ca6d61
DJ
154462006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15447
15448 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15449 (linux_resume_one_process): Take a siginfo_t *. Update all
15450 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15451 (struct pending_signals): Add a siginfo_t.
15452 (linux_wait_for_process): Always set last_status.
15453 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15454 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15455 * linux-low.h (struct process_info): Add last_status.
15456
5ffff7c1
DJ
154572006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15458
15459 * remote-utils.c (try_rle): New function.
15460 (putpkt_binary): Use it.
15461
8695c747
DJ
154622006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15465 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15466 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15467 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15468 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15469 point registers.
15470
290fadea
RS
154712006-08-08 Richard Sandiford <richard@codesourcery.com>
15472
15473 * server.c (terminal_fd): New variable.
15474 (old_foreground_pgrp): Likewise.
15475 (restore_old_foreground_pgrp): New function.
15476 (start_inferior): Record the terminal file descriptor in terminal_fd
15477 and its original foreground group in old_foreground_pgrp. Register
15478 restore_old_foreground_pgrp with atexit().
15479
9f2e1e63
DJ
154802006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15481
15482 * server.c (handle_query): Correct qPart to qXfer.
15483
b80864fb
DJ
154842006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15485
15486 * configure.ac: Check for more headers which are missing on
15487 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15488 * configure.srv: Add Cygwin and mingw32.
15489 * remote-utils.c: Don't include headers unconditionally which
15490 are missing on mingw32. Include <winsock.h> for mingw32.
15491 (remote_open): Adjust for mingw32 support. Flush
15492 standard error after writing to it.
15493 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15494 (unblock_async_io, enable_async_io, disable_async_io)
15495 (readchar, getpkt): Update for Winsock support.
15496 (prepare_resume_reply): Expect a protocol signal number.
15497 * server.c: Disable <sys/wait.h> on mingw32.
15498 (start_inferior): Adjust for mingw32 support. Flush
15499 standard error after writing to it.
15500 (attach_inferior): Likewise. Use protocol signal
15501 numbers.
15502 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15503 and names.
15504 * win32-i386-low.c: New file.
15505 * Makefile.in (XM_CLIBS): Set.
15506 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15507 (win32-i386-low.o): New dependency rule.
15508 * linux-low.c (linux_wait): Use target signal numbers.
15509 * target.h (struct target_ops): Doc fix.
15510 * server.h (target_signal_to_name): New prototype.
15511 * gdbreplay.c: Don't include headers unconditionally which
15512 are missing on mingw32. Include <winsock.h> for mingw32.
15513 (remote_close, remote_open): Adjust for Winsock support.
15514 * configure, config.in: Regenerated.
15515
0876f84a
DJ
155162006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * server.c (decode_xfer_read, write_qxfer_response): New.
15519 (handle_query): Take a packet length argument. Handle
15520 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15521 the qSupported response.
15522 (main): Update call to handle_query.
15523
01f9e8fa
DJ
155242006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15525
15526 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15527 (putpkt_binary): Renamed from putpkt and adjusted for binary
15528 data.
15529 (putpkt): New wrapper for putpkt_binary.
15530 (readchar): Don't mask off the high bit.
15531 (decode_X_packet): New function.
15532 * server.c (main): Call putpkt_binary if a handler sets the packet
15533 length. Save the length of the incoming packet. Handle 'X'.
15534 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15535
be2a5f71
DJ
155362006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15537
15538 * server.c (handle_query): Handle qSupported.
15539
ea025f5f
DJ
155402006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * remote-utils.c (all_symbols_looked_up): New variable.
15543 (look_up_one_symbol): Check it.
15544 * server.h (look_up_one_symbol): New declaration.
15545 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15546
9308fc88
DJ
155472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15548
15549 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15550 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15551 (PTRACE_GET_THREAD_AREA): Define.
15552 (ps_get_thread_area): New function.
15553
52fb6437
NS
155542006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15555
15556 * configure.srv (m68k*-*-uclinux*): New target.
15557 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15558 (linux_resume_one_process): Remove extraneous cast.
15559 (linux_read_offsets): New.
15560 (linux_target_op): Add linux_read_offsets on mmuless systems.
15561 * server.c (handle_query): Add qOffsets logic.
15562 * target.h (struct target_ops): Add read_offsets.
15563
21b0f40c
DJ
155642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15567 (PTRACE_GET_THREAD_AREA): Define.
15568 (ps_get_thread_area): New function.
15569 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15570 (linux-x86-64-low.o): Update.
15571
0050a760
DJ
155722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15573
15574 * configure.ac: Remove checks for prfpregset_t.
15575 * gdb_proc_service.h: New file.
15576 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15577 new "gdb_proc_service.h".
15578 * proc-service.c: Likewise.
15579 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15580 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15581 * Makefile.in (gdb_proc_service_h): Updated.
15582 * configure, config.in: Regenerated.
15583
b92a518e
DJ
155842006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15585
15586 * remote-utils.c (prepare_resume_reply): Move declaration
15587 of gdb_id_from_wait to the top of the block.
15588
545587ee
DJ
155892006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15590
15591 * linux-low.c (regsets_store_inferior_registers): Read the regset
15592 from the target before filling it.
15593
9db87ebd
DJ
155942006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * server.c (attach_inferior): Return SIGTRAP for a successful
15597 attach.
15598
dd24457d
DJ
155992006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15600
15601 * Makefile.in (OBS): Add version.o.
15602 (STAGESTUFF): Delete.
15603 (version.o): Add dependencies.
15604 (version.c): Replace rule.
15605 (clean): Remove version.c.
15606 * server.c (gdbserver_version): New.
15607 (gdbserver_usage): Use printf.
15608 (main): Handle --version and --help.
15609 * server.h (version, host_name): Add declarations.
15610
6f0f660e
EZ
156112005-12-23 Eli Zaretskii <eliz@gnu.org>
15612
889bf7c5
PA
15613 * linux-arm-low.c:
15614 * linux-arm-low.c:
15615 * inferiors.c:
15616 * i387-fp.h:
15617 * i387-fp.c:
15618 * gdbreplay.c:
15619 * regcache.c:
15620 * proc-service.c:
15621 * mem-break.h:
15622 * mem-break.c:
15623 * linux-x86-64-low.c:
15624 * linux-sh-low.c:
15625 * linux-s390-low.c:
15626 * linux-ppc64-low.c:
15627 * linux-ppc-low.c:
15628 * linux-mips-low.c:
15629 * linux-m68k-low.c:
15630 * linux-m32r-low.c:
15631 * linux-low.h:
15632 * linux-low.c:
15633 * linux-ia64-low.c:
15634 * linux-i386-low.c:
15635 * linux-crisv32-low.c:
15636 * thread-db.c:
15637 * terminal.h:
15638 * target.h:
15639 * target.c:
15640 * server.h:
15641 * server.c:
15642 * remote-utils.c:
15643 * regcache.h:
15644 * utils.c:
15645 * Makefile.in:
15646 * configure.ac:
6f0f660e
EZ
15647 * gdbserver.1: Add (C) after Copyright. Update the FSF
15648 address.
15649
9d1fb177
DJ
156502005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15653 (arm_breakpoint_at): Recognize both breakpoints.
15654 (the_low_target): Use the correct breakpoint instruction.
15655
011a70c2
DJ
156562005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15657
15658 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15659 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15660 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15661 (the_low_target): Update.
15662
7fb85e41
AS
156632005-10-25 Andreas Schwab <schwab@suse.de>
15664
15665 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15666
15667 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15668 (ia64_num_regs): Reduce to 462.
15669
3db0444b
DJ
156702005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15671
15672 * acinclude.m4: Correct quoting.
15673 * aclocal.m4: Regenerated.
15674
15675 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15676 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15677 (thread_db_init): Call thread_db_err_str.
15678 * configure.ac: Check for TD_VERSION.
15679 * config.in, configure: Regenerated.
15680
bee0189a
DJ
156812005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15682
15683 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15684
e9d25b98
DJ
156852005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15688 is not available. Define HAVE_PTRACE_GETREGS if it is.
15689 * config.in, configure: Regenerated.
15690 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15691 * linux-i386-low.c, linux-m68k-low.c: Update to use
15692 HAVE_PTRACE_GETREGS.
15693 * linux-low.c (regsets_fetch_inferior_registers)
15694 (regsets_store_inferior_registers): Only return 0 if we processed
15695 GENERAL_REGS.
15696 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15697 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15698
a06660f7
DJ
156992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15700
15701 * inferiors.c (struct thread_info): Add gdb_id.
15702 (add_thread): Add gdb_id argument.
15703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15704 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15705 calls to add_thread.
15706 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15707 * server.c (handle_query): Use thread_to_gdb_id.
15708 (handle_v_cont, main): Use gdb_id_to_thread_id.
15709 * server.h (add_thread): Update prototype.
15710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15711 prototypes.
15712
5a1f5858
DJ
157132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15714
15715 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15716 left-padded registers.
15717 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15718 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15719
e122f1f5
SE
157202005-07-01 Steve Ellcey <sje@cup.hp.com>
15721
15722 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15723 * configure: Regenerate.
15724 * config.in: Regenerate.
15725 * server.h (NEED_DECLARATION_STRERROR):
15726 Replace with !HAVE_DECL_STRERROR.
15727
d592fa2f
DJ
157282005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * linux-low.c (linux_wait, linux_send_signal): Don't test
15731 an unsigned long variable for > 0 if it could be MAX_ULONG.
15732 * server.c (myresume): Likewise.
15733 * target.c (set_desired_inferior): Likewise.
15734
ccbd4912
MK
157352005-06-13 Mark Kettenis <kettenis@gnu.org>
15736
15737 * configure.ac: Simplify and improve check for socklen_t.
15738 * configure, config.in: Regenerate.
15739
f450004a
DJ
157402005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15741
15742 * acconfig.h: Remove.
15743 * configure.ac: Add a test for socklen_t. Use three-argument
15744 AC_DEFINE throughout.
15745 * config.in: Regenerated using autoheader 2.59.
15746 * configure: Regenerated.
15747
15748 * gdbreplay.c (socklen_t): Provide a default.
15749 (remote_open): Use socklen_t.
15750 * remote-utils.c (socklen_t): Provide a default.
15751 (remote_open): Use socklen_t.
15752 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15753 unsigned char.
15754
15755 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15756 char for buffers.
15757 * linux-low.c (linux_read_memory, linux_write_memory)
15758 (linux_read_auxv): Likewise.
15759 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15760 (check_mem_write): Likewise.
15761 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15762 Likewise.
15763 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15764 (registers_from_string, register_data): Likewise.
15765 * server.c (handle_query, main): Likewise.
15766 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15767 (decode_M_packet): Likewise.
15768 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15769 * target.h (struct target_ops): Update read_memory, write_memory,
15770 and read_auxv.
15771 (read_inferior_memory, write_inferior_memory): Update.
15772 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15773 to unsigned char *.
15774 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15775 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15776 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15777 linux-s390-low.c, linux-sh-low.c: Update for changes in
15778 read_inferior_memory and the_low_target->breakpoint.
15779
eee84df1
DJ
157802005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15781
15782 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15783 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15784 * configure.srv: Add powerpc64-*-linux*.
15785 * linux-ppc64-low.c: New file.
15786
45b134e5
OF
157872005-05-23 Orjan Friberg <orjanf@axis.com>
15788
15789 * linux-cris-low.c: New file with support for CRIS.
15790 * linux-crisv32-low.c: Ditto for CRISv32.
15791 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15792 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15793 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15794 reg-crisv32.o, and reg-crisv32.c to make rules.
15795 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15796 recognized targets.
15797
48d93c75
UW
157982005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15799
15800 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15801 of sizeof (PTRACE_XFER_TYPE).
15802 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15803
e013ee27
OF
158042005-05-12 Orjan Friberg <orjanf@axis.com>
15805
889bf7c5 15806 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15807 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15808 pointers for hardware watchpoint support.
15809 * linux-low.h (struct linux_target_ops): Ditto.
15810 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15811 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15812 to linux_target_ops.
15813 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15814 reply packet.
15815 * server.c (main): Recognize 'Z' and 'z' packets.
15816
b0ded00b
UW
158172005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15818
15819 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15820 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15821 (the_low_target): Add new members.
15822
8643e2ad
DJ
158232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15824
15825 * proc-service.c (ps_lgetregs): Search all_processes instead of
15826 all_threads.
15827
fc620387
DJ
158282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * server.c (start_inferior): Change return type to int.
15831 (attach_inferior): Change sigptr to int *.
15832 (handle_v_cont, handle_v_requests): Change signal to int *.
15833 (main): Change signal to int.
15834
158352005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15836
15837 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15838 * configure.srv: Add m32r*-*-linux*.
15839 * linux-m32r-low.c: New file.
15840
e0e76420
DJ
158412005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15844
a1928bad
DJ
158452005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15846
15847 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15848 Take unsigned long arguments for PIDs.
15849 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15850 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15851 (wait_for_sigstop, linux_resume_one_process)
15852 (regsets_fetch_inferior_registers, linux_send_signal)
15853 (linux_read_auxv): Likewise. Update the types of variables holding
15854 PIDs. Update format string specifiers.
15855 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15856 * remote-utils.c (prepare_resume_reply): Likewise.
15857 * server.c (cont_thread, general_thread, step_thread)
15858 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15859 unsigned long.
15860 (handle_query): Update format specifiers.
15861 (handle_v_cont, main): Use strtoul for thread IDs.
15862 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15863 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15864 (general_thread, step_thread, thread_from_wait)
15865 (old_thread_from_wait): Update.
15866 * target.h (struct thread_resume): Use unsigned long for THREAD.
15867 (struct target_ops): Use unsigned long for arguments to attach and
15868 thread_alive.
15869
dcdb98d2
DJ
158702005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * acinclude.m4: Include bfd/bfd.m4 directly.
15873 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15874 <agriffis@toolchain.org>.
15875 * aclocal.m4, configure: Regenerated.
15876
bec39cab
AC
158772005-01-07 Andrew Cagney <cagney@gnu.org>
15878
15879 * configure.ac: Rename configure.in, require autoconf 2.59.
15880 * configure: Re-generate.
15881
434c4c77
DJ
158822004-12-08 Daniel Jacobowitz <dan@debian.org>
15883
15884 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15885 LIBS when finished.
15886 * aclocal.m4: Regenerated.
15887 * configure: Regenerated.
15888
db1d3e1b
AS
158892004-11-21 Andreas Schwab <schwab@suse.de>
15890
15891 * linux-m68k-low.c (m68k_num_gregs): Define.
15892 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15893 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15894 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15895 (m68k_breakpoint_at): New. Add to the_low_target.
15896
15897 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15898 srv_linux_thread_db to yes.
15899
43360365
JB
159002004-10-20 Joel Brobecker <brobecker@gnat.com>
15901
15902 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15903 (ARCH_SET_FS): Likewise.
15904 (ARCH_GET_FS): Likewise.
15905 (ARCH_GET_GS): Likewise.
15906
fd500816
DJ
159072004-10-16 Daniel Jacobowitz <dan@debian.org>
15908
15909 * linux-i386-low.c (ps_get_thread_area): New.
15910 * linux-x86-64-low.c (ps_get_thread_area): New.
15911 * linux-low.c: Include <sys/syscall.h>.
15912 (linux_kill_one_process): Don't kill the first thread here.
15913 (linux_kill): Kill the first thread here.
15914 (kill_lwp): New function.
15915 (send_sigstop, linux_send_signal): Use it.
15916 * proc-service.c: Clean up #ifdefs.
15917 (fpregset_info): Delete.
15918 (ps_lgetregs): Update and enable implementation.
15919 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15920 implementations.
15921 * remote-utils.c (struct sym_cache, symbol_cache): New.
15922 (input_interrupt): Print a clearer message.
15923 (async_io_enabled): New variable.
15924 (enable_async_io, disable_async_io): Use it. Update comments.
15925 (look_up_one_symbol): Use the symbol cache.
15926 * thread-db.c (thread_db_look_up_symbols): New function.
15927 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15928
f6de3c42
DJ
159292004-10-16 Daniel Jacobowitz <dan@debian.org>
15930
15931 * configure.in: Test for -rdynamic.
15932 * configure: Regenerated.
15933 * Makefile (INTERNAL_LDFLAGS): New.
15934 (gdbserver, gdbreplay): Use it.
15935
2c0fc042
AC
159362004-09-02 Andrew Cagney <cagney@gnu.org>
15937
15938 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15939
075b3282
DJ
159402004-03-23 Daniel Jacobowitz <drow@mvista.com>
15941
15942 * linux-low.c (linux_wait): Clear all_processes list also.
15943
fa6a77dc
DJ
159442004-03-12 Daniel Jacobowitz <drow@mvista.com>
15945
15946 * linux-low.c: Include <errno.h>. Remove extern declaration of
15947 errno.
15948
6d782a97
DJ
159492004-03-12 Daniel Jacobowitz <drow@mvista.com>
15950
15951 * gdbreplay.c, server.h, utils.c: Update copyright years.
15952
3a7fb99b
DJ
159532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15954
15955 * server.c (main): Print child status or termination signal from
15956 variable 'signal', not 'sig'.
15957
c3e735a6
DJ
159582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15959
15960 * linux-low.c (linux_read_memory): Change return type to
15961 int. Check for and return error from ptrace().
15962 * target.c (read_inferior_memory): Change return type to int. Pass
15963 back return status from the_target->read_memory().
15964 * target.h (struct target_ops): Adapt *read_memory() prototype.
15965 Update comment.
15966 (read_inferior_memory): Adapt prototype.
15967 * server.c (main): Return an error packet if
15968 read_inferior_memory() returns an error.
15969
a59d1c82
DJ
159702004-03-04 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15973 Unify with other clean targets.
15974
dc3f8883
DJ
159752004-02-29 Daniel Jacobowitz <drow@mvista.com>
15976
15977 * server.c (handle_v_cont): Call set_desired_inferior.
15978
89a208da
DJ
159792004-02-29 Daniel Jacobowitz <drow@mvista.com>
15980
15981 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15982
62ea82f5
DJ
159832004-02-29 Daniel Jacobowitz <drow@mvista.com>
15984
15985 * linux-low.c (linux_wait): Unblock async I/O.
15986 (linux_resume): Block and enable async I/O.
15987 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15988 * server.h (block_async_io, unblock_async_io): Add prototypes.
15989
6910d122
DJ
159902004-02-29 Daniel Jacobowitz <drow@mvista.com>
15991
15992 * remote-utils.c (remote_open): Print a status notice after
15993 opening a TCP port.
15994 * server.c (attach_inferior): Print a status notice after
15995 attaching.
15996
159972004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15998
15999 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16000
c89dc5d4
DJ
160012004-02-26 Daniel Jacobowitz <drow@mvista.com>
16002
16003 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16004 error packet.
16005 * server.c, target.h: Update copyright years.
16006
4b8dad4a
RM
160072004-02-25 Roland McGrath <roland@redhat.com>
16008
16009 * target.h (struct target_ops): New member `read_auxv'.
16010 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16011 * linux-low.c (linux_read_auxv): New function.
16012 (linux_target_ops): Initialize `read_auxv' member to that.
16013
d7446758
JB
160142004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16015
16016 Committed by Jim Blandy <jimb@redhat.com>.
16017
16018 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16019 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16020 instead of GPR_SIZE to distiguish s390 and s390x targets.
16021
5544ad89
DJ
160222004-01-31 Daniel Jacobowitz <drow@mvista.com>
16023
16024 * linux-low.c: Update copyright year.
16025 (check_removed_breakpoint): Clear pending_is_breakpoint.
16026 (linux_set_resume_request, linux_queue_one_thread)
16027 (resume_status_pending_p): New functions.
16028 (linux_continue_one_thread): Use process->resume.
16029 (linux_resume): Only resume threads if there are no pending events.
16030 * linux-low.h (struct process_info): Add resume request
16031 pointer.
16032
2a68b70e
DJ
160332004-01-30 Daniel Jacobowitz <drow@mvista.com>
16034
16035 * regcache.c (new_register_cache): Clear the allocated register
16036 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16037
64386c31
DJ
160382003-10-13 Daniel Jacobowitz <drow@mvista.com>
16039
16040 * linux-low.c (linux_resume): Take a struct thread_resume *
16041 argument.
16042 (linux_wait): Update call.
16043 (resume_ptr): New static variable.
16044 (linux_continue_one_thread): Renamed from
16045 linux_continue_one_process. Use resume_ptr.
16046 (linux_resume): Use linux_continue_one_thread.
16047 * server.c (handle_v_cont, handle_v_requests): New functions.
16048 (myresume): New function.
16049 (main): Handle 'v' case.
16050 * target.h (struct thread_resume): New type.
16051 (struct target_ops): Change argument of "resume" to struct
16052 thread_resume *.
16053 (myresume): Delete macro.
16054
c938e9b0
L
160552003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16056
16057 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16058 (uninstall): Support DESTDIR.
16059
7f313d07
BC
16060Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16061
16062 * configure.srv: Add xscale*linux copy of arm*linux entry.
16063
3b2fc2ea
DJ
160642003-07-24 Daniel Jacobowitz <drow@mvista.com>
16065
16066 * linux-arm-low.c (arm_reinsert_addr): New function.
16067 (the_low_target): Add arm_reinsert_addr.
16068
1c0a559e
MK
160692003-07-08 Mark Kettenis <kettenis@gnu.org>
16070
16071 * mem-break.c: Remove whitespace at end of file.
16072
43d5792c
DJ
160732003-06-28 Daniel Jacobowitz <drow@mvista.com>
16074
16075 * configure.in: Check whether we need to prototype strerror.
16076 * server.h: Optionally prototype strerror.
16077 * gdbreplay.c (perror_with_name): Use strerror.
16078 * linux-low.c (linux_attach_lwp): Use strerror.
16079 * utils.c (perror_with_name): Use strerror.
16080 * config.in, configure: Regenerated.
16081
c8a86edf
DJ
160822003-06-28 Daniel Jacobowitz <drow@mvista.com>
16083
16084 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16085 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16086
73d37363
DJ
160872003-06-20 Daniel Jacobowitz <drow@mvista.com>
16088
16089 * Makefile.in (SFILES): Update.
16090 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16091 low-sun3.c: Remove files.
16092
6ad8ae5c
DJ
160932003-06-17 Daniel Jacobowitz <drow@mvista.com>
16094
16095 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16096 (linux_detach_one_process, linux_detach): New functions.
16097 (linux_target_ops): Add linux_detach.
16098 * server.c (main): Handle 'D' packet.
16099 * target.h (struct target_ops): Add "detach" member.
16100 (detach_inferior): Define.
16101
1581182a
MK
161022003-06-13 Mark Kettenis <kettenis@gnu.org>
16103
16104 From Kelley Cook <kelleycook@wideopenwest.com>:
16105 * configure.srv: Accept i[34567]86 variants.
16106
e5379b03
DJ
161072003-06-05 Daniel Jacobowitz <drow@mvista.com>
16108
16109 * linux-low.c (linux_wait_for_event): Correct comment typos.
16110 (linux_resume_one_process): Call check_removed_breakpoint.
16111 (linux_send_signal): New function.
16112 (linux_target_ops): Add linux_send_signal.
16113 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16114 of kill.
16115 * target.h (struct target_ops): Add send_signal.
16116
2ff29de4
JB
161172003-05-29 Jim Blandy <jimb@redhat.com>
16118
16119 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16120 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16121 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16122 away part of the register's value.
16123
254787d4
DJ
161242003-03-26 Daniel Jacobowitz <drow@mvista.com>
16125
16126 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16127 (linux_wait_for_event, linux_init_signals): Likewise.
16128
94e10508
DJ
161292003-03-17 Daniel Jacobowitz <drow@mvista.com>
16130
16131 * configure.in: Check for stdlib.h.
16132 * configure: Regenerated.
16133 * config.in: Regenerated.
16134
4c0711e0
DJ
161352003-01-04 Andreas Schwab <schwab@suse.de>
16136
16137 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16138
ef66e766
AC
161392003-01-02 Andrew Cagney <ac131313@redhat.com>
16140
16141 * Makefile.in: Remove obsolete code.
16142
a1358604
DJ
161432002-11-20 Daniel Jacobowitz <drow@mvista.com>
16144
16145 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16146 defined(PT_FPR0_HI).
16147
23ce3b1c
DJ
161482002-11-17 Stuart Hughes <seh@zee2.com>
16149
16150 * linux-arm-low.c (arm_num_regs): Increase.
16151 (arm_regmap): Include status register.
16152
161532002-11-17 Daniel Jacobowitz <drow@mvista.com>
16154
16155 * linux-low.c (register_addr): Remove incorrect -1 check.
16156
a9fa9f7d
DJ
161572002-08-29 Daniel Jacobowitz <drow@mvista.com>
16158
16159 * linux-low.c (linux_create_inferior): Call setpgid. Return
16160 the new PID.
16161 (unstopped_p, linux_signal_pid): Remove.
16162 (linux_target_ops): Remove linux_signal_pid.
16163 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16164 global instead of target method.
16165 * target.h (struct target_ops): Remove signal_pid. Update comment
16166 for create_inferior.
16167 * server.c (signal_pid): New variable.
16168 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16169 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16170 (attach_inferior): Set signal_pid.
16171
17574093
DJ
161722002-08-23 Daniel Jacobowitz <drow@mvista.com>
16173
16174 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16175
161762002-08-20 Jim Blandy <jimb@redhat.com>
16177
16178 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16179 default for this.
16180
161812002-08-01 Andrew Cagney <cagney@redhat.com>
16182
16183 * Makefile.in: Make chill references obsolete.
16184
161852002-07-24 Kevin Buettner <kevinb@redhat.com>
16186
16187 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16188 * configure: Regenerate.
16189 * config.in: Regenerate.
16190
161912002-07-09 David O'Brien <obrien@FreeBSD.org>
16192
16193 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16194 (perror_with_name, remote_close, remote_open, expect, play): Static.
16195
161962002-07-04 Michal Ludvig <mludvig@suse.cz>
16197
4b8dad4a 16198 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16199 byte offsets instead of an array of indexes.
16200 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16201
162022002-06-13 Daniel Jacobowitz <drow@mvista.com>
16203
16204 * regcache.c: Add comment.
16205
162062002-06-11 Daniel Jacobowitz <drow@mvista.com>
16207
16208 * thread-db.c: New file.
16209 * proc-service.c: New file.
16210 * acinclude.m4: New file.
16211 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16212 proc-service.o, and thread-db.o.
16213 (linux-low.o): Add USE_THREAD_DB.
16214 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16215 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16216 * aclocal.m4: Regenerated.
16217 * config.in: Regenerated.
16218 * configure: Regenerated.
16219 * configure.in: Check for proc_service.h, sys/procfs.h,
16220 thread_db.h, and linux/elf.h headrs.
16221 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16222 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16223 Check for -lthread_db and thread support.
16224 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16225 PowerPC, and SuperH.
16226 * i387-fp.c: Constify arguments.
16227 * i387-fp.h: Likewise.
16228 * inferiors.c: (struct thread_info): Renamed from
16229 `struct inferior_info'. Remove PID member. Use generic inferior
16230 list header. All uses updated.
16231 (inferiors, signal_pid): Removed.
16232 (all_threads): New variable.
16233 (get_thread): Define.
16234 (add_inferior_to_list): New function.
16235 (for_each_inferior): New function.
16236 (change_inferior_id): New function.
16237 (add_inferior): Removed.
16238 (remove_inferior): New function.
16239 (add_thread): New function.
16240 (free_one_thread): New function.
16241 (remove_thread): New function.
16242 (clear_inferiors): Use for_each_inferior and free_one_thread.
16243 (find_inferior): New function.
16244 (find_inferior_id): New function.
16245 (inferior_target_data): Update argument type.
16246 (set_inferior_target_data): Likewise.
16247 (inferior_regcache_data): Likewise.
16248 (set_inferior_regcache_data): Likewise.
16249 * linux-low.c (linux_bp_reinsert): Remove.
16250 (all_processes, stopping_threads, using_thrads)
16251 (struct pending_signals, debug_threads, pid_of): New.
16252 (inferior_pid): Replace with macro.
16253 (struct inferior_linux_data): Remove.
16254 (get_stop_pc, add_process): New functions.
16255 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16256 Use add_process and add_thread.
16257 (linux_attach_lwp): New function, based on old linux_attach. Use
16258 add_process and add_thread. Set stop_expected for new threads.
16259 (linux_attach): New function.
16260 (linux_kill_one_process): New function.
16261 (linux_kill): Kill all LWPs.
16262 (linux_thread_alive): Use find_inferior_id.
16263 (check_removed_breakpoints, status_pending_p): New functions.
16264 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16265 Update. Use WNOHANG. Wait for cloned processes also. Update process
16266 struct for the found process.
16267 (linux_wait_for_event): New function.
16268 (linux_wait): Use it. Support LWPs.
16269 (send_sigstop, wait_for_sigstop, stop_all_processes)
16270 (linux_resume_one_process, linux_continue_one_process): New functions.
16271 (linux_resume): Support LWPs.
16272 (REGISTER_RAW_SIZE): Remove.
16273 (fetch_register): Use register_size instead. Call supply_register.
16274 (usr_store_inferior_registers): Likewise. Call collect_register.
16275 Fix recursive case.
16276 (regsets_fetch_inferior_registers): Improve error message.
16277 (regsets_store_inferior_registers): Add debugging.
16278 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16279 (unstopped_p, linux_signal_pid): New functions.
16280 (linux_target_ops): Add linux_signal_pid.
16281 (linux_init_signals): New function.
16282 (initialize_low): Call it. Initialize using_threads.
16283 * regcache.c (inferior_regcache_data): Add valid
16284 flag.
16285 (get_regcache): Fetch registers lazily. Add fetch argument
16286 and update all callers.
16287 (regcache_invalidate_one, regcache_invalidate): New
16288 functions.
16289 (new_register_cache): Renamed from create_register_cache.
16290 Return the new regcache.
16291 (free_register_cache): Change argument to a void *.
16292 (registers_to_string, registers_from_string): Call get_regcache
16293 with fetch flag set.
16294 (register_data): Make static. Pass fetch flag to get_regcache.
16295 (supply_register): Call get_regcache with fetch flag clear.
16296 (collect_register): Call get_regcache with fetch flag set.
16297 (collect_register_as_string): New function.
16298 * regcache.h: Update.
16299 * remote-utils.c (putpkt): Flush after debug output and use
16300 stderr.
16301 Handle input interrupts while waiting for an ACK.
16302 (input_interrupt): Use signal_pid method.
16303 (getpkt): Flush after debug output and use stderr.
16304 (outreg): Use collect_register_as_string.
16305 (new_thread_notify, dead_thread_notify): New functions.
16306 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16307 and general_thread.
16308 (look_up_one_symbol): Flush after debug output.
16309 * server.c (step_thread, server_waiting): New variables.
16310 (start_inferior): Don't use signal_pid. Update call to mywait.
16311 (attach_inferior): Update call to mywait.
16312 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16313 (main): Don't fetch/store registers explicitly. Use
16314 set_desired_inferior. Support proposed ``Hs'' packet. Update
16315 calls to mywait.
16316 * server.h: Update.
16317 (struct inferior_list, struct_inferior_list_entry): New.
16318 * target.c (set_desired_inferior): New.
16319 (write_inferior_memory): Constify.
16320 (mywait): New function.
16321 * target.h: Update.
16322 (struct target_ops): New signal_pid method.
16323 (mywait): Removed macro, added prototype.
16324
16325 * linux-low.h (regset_func): Removed.
16326 (regset_fill_func, regset_store_func): New.
16327 (enum regset_type): New.
16328 (struct regset_info): Add type field. Use new operation types.
16329 (struct linux_target_ops): stop_pc renamed to get_pc.
16330 Add decr_pc_after_break and breakpoint_at.
16331 (get_process, get_thread_proess, get_process_thread)
16332 (strut process_info, all_processes, linux_attach_lwp)
16333 (thread_db_init): New.
16334
16335 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16336 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16337 (the_low_target): Add new members.
16338 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16339 (i386_store_fpxregset): Constify.
16340 (target_regsets): Add new kind identifier.
16341 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16342 (i386_set_pc): Add debugging.
16343 (i386_breakpoint_at): New function.
16344 (the_low_target): Add new members.
16345 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16346 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16347 (mips_breakpoint_at): New.
16348 (the_low_target): Add new members.
16349 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16350 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16351 (the_low_target): Add new members.
16352 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16353 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16354 (the_low_target): Add new members.
16355 * linux-x86-64-low.c (target_regsets): Add new kind
16356 identifier.
16357
163582002-05-15 Daniel Jacobowitz <drow@mvista.com>
16359
16360 From Martin Pool <mbp@samba.org>:
16361 * server.c (gdbserver_usage): New function.
16362 (main): Call it.
16363
163642002-05-14 Daniel Jacobowitz <drow@mvista.com>
16365
16366 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16367 stop_at -> stop_pc.
16368
163692002-05-04 Andrew Cagney <ac131313@redhat.com>
16370
16371 * Makefile.in: Remove obsolete code.
16372
163732002-04-24 Michal Ludvig <mludvig@suse.cz>
16374
16375 * linux-low.c (regsets_fetch_inferior_registers),
16376 (regsets_store_inferior_registers): Removed cast to int from
16377 ptrace() calls.
16378 * regcache.h: Added declaration of struct inferior_info.
16379
163802002-04-20 Daniel Jacobowitz <drow@mvista.com>
16381
16382 * inferiors.c (struct inferior_info): Add regcache_data.
16383 (add_inferior): Call create_register_cache.
16384 (clear_inferiors): Call free_register_cache.
16385 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16386 * regcache.c (struct inferior_regcache_data): New.
16387 (registers): Remove.
16388 (get_regcache): New function.
16389 (create_register_cache, free_register_cache): New functions.
16390 (set_register_cache): Don't initialize the register cache here.
16391 (registers_to_string, registers_from_string, register_data): Call
16392 get_regcache.
16393 * regcache.h: Add prototypes.
16394 * server.h: Likewise.
16395
163962002-04-20 Daniel Jacobowitz <drow@mvista.com>
16397
16398 * mem-break.c: New file.
16399 * mem-break.h: New file.
16400 * Makefile.in: Add mem-break.o rule; update server.h
16401 dependencies.
16402 * inferiors.c (struct inferior_info): Add target_data
16403 member.
16404 (clear_inferiors): Free target_data member if set.
16405 (inferior_target_data, set_inferior_target_data): New functions.
16406 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16407 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16408 * linux-low.c (linux_bp_reinsert): New variable.
16409 (struct inferior_linux_data): New.
16410 (linux_create_inferior): Use set_inferior_target_data.
16411 (linux_attach): Likewise. Call add_inferior.
16412 (linux_wait_for_one_inferior): New function.
16413 (linux_wait): Call it.
16414 (linux_write_memory): Add const.
16415 (initialize_low): Call set_breakpoint_data.
16416 * linux-low.h (struct linux_target_ops): Add breakpoint
16417 handling members.
16418 * server.c (attach_inferior): Remove extra add_inferior
16419 call.
16420 * server.h: Include mem-break.h. Update inferior.c
16421 prototypes.
16422 * target.c (read_inferior_memory)
16423 (write_inferior_memory): New functions.
16424 * target.h (read_inferior_memory)
16425 (write_inferior_memory): Change macros to prototypes.
16426 (struct target_ops): Update comments. Add const to write_memory
16427 definition.
16428
164292002-04-11 Daniel Jacobowitz <drow@mvista.com>
16430
16431 * linux-low.c (usr_store_inferior_registers): Support
16432 registers which are allowed to fail to store.
16433 * linux-low.h (linux_target_ops): Likewise.
16434 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16435 (ppc_cannot_store_register): FPSCR may not be storable.
16436
164372002-04-09 Daniel Jacobowitz <drow@mvista.com>
16438
16439 * server.h: Include <string.h> if HAVE_STRING_H.
16440 * ChangeLog: Correct paths in last ChangeLog entry.
16441
164422002-04-09 Daniel Jacobowitz <drow@mvista.com>
16443
16444 * linux-low.h: Remove obsolete prototypes.
16445 (struct linux_target_ops): New.
16446 (extern the_low_target): New.
16447 * linux-low.c (num_regs, regmap): Remove declarations.
16448 (register_addr): Use the_low_target explicitly.
16449 (fetch_register): Likewise.
16450 (usr_fetch_inferior_registers): Likewise.
16451 (usr_store_inferior_registers): Likewise.
16452 * linux-arm-low.c (num_regs): Remove.
16453 (arm_num_regs): Define.
16454 (arm_regmap): Renamed from regmap, made static.
16455 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16456 made static.
16457 (arm_cannot_store_register): Renamed from cannot_store_register,
16458 made static.
16459 (the_low_target): New.
16460 * linux-i386-low.c (num_regs): Remove.
16461 (i386_num_regs): Define.
16462 (i386_regmap): Renamed from regmap, made static.
16463 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16464 made static.
16465 (i386_cannot_store_register): Renamed from cannot_store_register,
16466 made static.
16467 (the_low_target): New.
16468 * linux-ia64-low.c (num_regs): Remove.
16469 (ia64_num_regs): Define.
16470 (ia64_regmap): Renamed from regmap, made static.
16471 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16472 made static.
16473 (ia64_cannot_store_register): Renamed from cannot_store_register,
16474 made static.
16475 (the_low_target): New.
16476 * linux-m68k-low.c (num_regs): Remove.
16477 (m68k_num_regs): Define.
16478 (m68k_regmap): Renamed from regmap, made static.
16479 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16480 made static.
16481 (m68k_cannot_store_register): Renamed from cannot_store_register,
16482 made static.
16483 (the_low_target): New.
16484 * linux-mips-low.c (num_regs): Remove.
16485 (mips_num_regs): Define.
16486 (mips_regmap): Renamed from regmap, made static.
16487 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16488 made static.
16489 (mips_cannot_store_register): Renamed from cannot_store_register,
16490 made static.
16491 (the_low_target): New.
16492 * linux-ppc-low.c (num_regs): Remove.
16493 (ppc_num_regs): Define.
16494 (ppc_regmap): Renamed from regmap, made static.
16495 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16496 made static.
16497 (ppc_cannot_store_register): Renamed from cannot_store_register,
16498 made static.
16499 (the_low_target): New.
16500 * linux-s390-low.c (num_regs): Remove.
16501 (s390_num_regs): Define.
16502 (s390_regmap): Renamed from regmap, made static.
16503 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16504 made static.
16505 (s390_cannot_store_register): Renamed from cannot_store_register,
16506 made static.
16507 (the_low_target): New.
16508 * linux-sh-low.c (num_regs): Remove.
16509 (sh_num_regs): Define.
16510 (sh_regmap): Renamed from regmap, made static.
16511 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16512 made static.
16513 (sh_cannot_store_register): Renamed from cannot_store_register,
16514 made static.
16515 (the_low_target): New.
16516 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16517 (the_low_target): New.
16518
165192002-04-09 Daniel Jacobowitz <drow@mvista.com>
16520
16521 * Makefile.in: Add stamp-h target.
16522 * configure.in: Create stamp-h.
16523 * configure: Regenerated.
16524
165252002-04-09 Daniel Jacobowitz <drow@mvista.com>
16526
16527 * inferiors.c: New file.
16528 * target.c: New file.
16529 * target.h: New file.
16530 * Makefile.in: Add target.o and inferiors.o. Update
16531 dependencies.
16532 * linux-low.c (inferior_pid): New static variable,
16533 moved from server.c.
16534 (linux_create_inferior): Renamed from create_inferior.
16535 Call add_inferior. Return 0 on success instead of a PID.
16536 (linux_attach): Renamed from myattach.
16537 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16538 (linux_thread_alive): Renamed from mythread_alive.
16539 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16540 child dies.
16541 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16542 (regsets_store_inferior_registers): Correct error message.
16543 Add missing ``return 0''.
16544 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16545 (linux_store_registers): Renamed from store_inferior_registers.
16546 (linux_read_memory): Renamed from read_inferior_memory.
16547 (linux_write_memory): Renamed from write_inferior_memory.
16548 (linux_target_ops): New structure.
16549 (initialize_low): Call set_target_ops ().
16550 * remote-utils.c (unhexify): New function.
16551 (hexify): New function.
16552 (input_interrupt): Send signals to ``signal_pid''.
16553 * server.c (inferior_pid): Remove.
16554 (start_inferior): Update create_inferior call.
16555 (attach_inferior): Call add_inferior.
16556 (handle_query): New function.
16557 (main): Call handle_query for `q' packets.
16558 * server.h: Include "target.h". Remove obsolete prototypes.
16559 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16560
165612002-04-09 Daniel Jacobowitz <drow@mvista.com>
16562
16563 * Makefile.in: Add WARN_CFLAGS. Update configury
16564 dependencies.
16565 * configure.in: Check for <string.h>
16566 * configure: Regenerate.
16567 * config.in: Regenerate.
16568 * gdbreplay.c: Include needed system headers.
16569 (remote_open): Remove strchr prototype.
16570 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16571 * regcache.c (supply_register): Change buf argument to const void *.
16572 (supply_register_by_name): Likewise.
16573 (collect_register): Change buf argument to void *.
16574 (collect_register_by_name): Likewise.
16575 * regcache.h: Add missing prototypes.
16576 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16577 * server.c (handle_query): New function.
16578 (attached): New static variable, moved out of main.
16579 (main): Quiet longjmp clobber warnings.
16580 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16581 * utils.c (error): Remove NORETURN.
16582 (fatal): Likewise.
This page took 4.479425 seconds and 4 git commands to generate.