#define DDA1_ENABLE 0x80
#define DIA2_ENABLE 0x40
#define DIA1_ENABLE 0x20
-#define DSINGLE_STEP 0x10
+#define DSINGLE_STEP 0x10 /* not used */
#define DDV_TYPE_MASK 0xc
#define DDV_TYPE_LOAD 0x0
#define DDV_TYPE_STORE 0x4
int cnt;
int ot;
{
+ /* Watchpoints not supported on simulator. */
+ if (strcmp (target_shortname, "sim") == 0)
+ return 0;
+
if (type == bp_hardware_breakpoint)
{
if (TARGET_HW_BREAK_LIMIT == 0)
char c;
{
debug_serial_write (desc, &c, 1);
- return readchar (desc, 2);
+ return readchar (desc, remote_timeout);
}
static void
{
remote_desc = open_tty (p);
- old_chain = make_cleanup (close_tty, 0);
+ old_chain = make_cleanup ((make_cleanup_func) close_tty, 0);
c = send_resp (remote_desc, 0x00);
perror_with_name (filename);
return;
}
- old_chain = make_cleanup (bfd_close, pbfd);
+ old_chain = make_cleanup ((make_cleanup_func) bfd_close, pbfd);
if (!bfd_check_format (pbfd, bfd_object))
error ("\"%s\" is not an object file: %s", filename,
{
if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
{
- bfd_vma section_address;
+ bfd_vma section_address;
bfd_size_type section_size;
- file_ptr fptr;
+ file_ptr fptr;
+ const char *section_name;
+
+ section_name = bfd_get_section_name(pbfd, section);
section_address = bfd_get_section_vma (pbfd, section);
+
/* Adjust sections from a.out files, since they don't
carry their addresses with. */
if (bfd_get_flavour (pbfd) == bfd_target_aout_flavour)
- section_address += LOAD_ADDRESS;
+ {
+ if (strcmp (section_name, ".text") == 0)
+ section_address = bfd_get_start_address (pbfd);
+ else if (strcmp (section_name, ".data") == 0)
+ {
+ /* Read the first 8 bytes of the data section.
+ There should be the string 'DaTa' followed by
+ a word containing the actual section address. */
+ struct data_marker
+ {
+ char signature[4]; /* 'DaTa' */
+ unsigned char sdata[4]; /* &sdata */
+ } marker;
+ bfd_get_section_contents (pbfd, section, &marker, 0,
+ sizeof (marker));
+ if (strncmp (marker.signature, "DaTa", 4) == 0)
+ {
+ if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+ section_address = bfd_getb32 (marker.sdata);
+ else
+ section_address = bfd_getl32 (marker.sdata);
+ }
+ }
+ }
section_size = bfd_get_section_size_before_reloc (section);
store_unsigned_integer (buffer + 1, 4, entry);
debug_serial_write (remote_desc, buffer, 1 + 4);
- i = readchar (remote_desc, 2);
+ i = readchar (remote_desc, remote_timeout);
if (i != 0x55)
error ("Can't start SparcLite. Error code %d\n", i);
}
error ("Bad response from load command (0x%x)", i);
debug_serial_write (remote_desc, buffer, 4 + 4 + len);
- i = readchar (remote_desc, 2);
+ i = readchar (remote_desc, remote_timeout);
if (i != checksum)
error ("Bad checksum from load command (0x%x)", i);
sparclite_ops.to_open = sparclite_open;
sparclite_ops.to_close = sparclite_close;
sparclite_ops.to_attach = 0;
- sparclite_ops.to_detach = 0;
+ sparclite_ops.to_post_attach = NULL;
+ sparclite_ops.to_require_attach = NULL;
+ sparclite_ops.to_detach = 0;
+ sparclite_ops.to_require_detach = NULL;
sparclite_ops.to_resume = 0;
- sparclite_ops.to_wait = 0;
+ sparclite_ops.to_wait = 0;
+ sparclite_ops.to_post_wait = NULL;
sparclite_ops.to_fetch_registers = 0;
sparclite_ops.to_store_registers = 0;
sparclite_ops.to_prepare_to_store = 0;
sparclite_ops.to_kill = 0;
sparclite_ops.to_load = sparclite_download;
sparclite_ops.to_lookup_symbol = 0;
- sparclite_ops.to_create_inferior = 0;
+ sparclite_ops.to_create_inferior = 0;
+ sparclite_ops.to_post_startup_inferior = NULL;
+ sparclite_ops.to_acknowledge_created_inferior = NULL;
+ sparclite_ops.to_clone_and_follow_inferior = NULL;
+ sparclite_ops.to_post_follow_inferior_by_clone = NULL;
+ sparclite_ops.to_insert_fork_catchpoint = NULL;
+ sparclite_ops.to_remove_fork_catchpoint = NULL;
+ sparclite_ops.to_insert_vfork_catchpoint = NULL;
+ sparclite_ops.to_remove_vfork_catchpoint = NULL;
+ sparclite_ops.to_has_forked = NULL;
+ sparclite_ops.to_has_vforked = NULL;
+ sparclite_ops.to_can_follow_vfork_prior_to_exec = NULL;
+ sparclite_ops.to_post_follow_vfork = NULL;
+ sparclite_ops.to_insert_exec_catchpoint = NULL;
+ sparclite_ops.to_remove_exec_catchpoint = NULL;
+ sparclite_ops.to_has_execd = NULL;
+ sparclite_ops.to_reported_exec_events_per_exec_call = NULL;
+ sparclite_ops.to_has_exited = NULL;
sparclite_ops.to_mourn_inferior = 0;
sparclite_ops.to_can_run = 0;
sparclite_ops.to_notice_signals = 0;
sparclite_ops.to_thread_alive = 0;
- sparclite_ops.to_stop = 0;
+ sparclite_ops.to_stop = 0;
+ sparclite_ops.to_pid_to_exec_file = NULL;
+ sparclite_ops.to_core_file_to_sym_file = NULL;
sparclite_ops.to_stratum = download_stratum;
sparclite_ops.DONT_USE = 0;
sparclite_ops.to_has_all_memory = 0;