diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-24 01:51:28 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-24 01:51:28 +0000 |
commit | 573becd8efc8eb3657f7f599c724058b09b9cfcf (patch) | |
tree | 301f21d1f43604d9a64edc72f0d884b1d4f4d94b | |
parent | 0e1132b735c6f1108d30d13f850f36168e39a044 (diff) | |
download | gdb-573becd8efc8eb3657f7f599c724058b09b9cfcf.zip gdb-573becd8efc8eb3657f7f599c724058b09b9cfcf.tar.gz gdb-573becd8efc8eb3657f7f599c724058b09b9cfcf.tar.bz2 |
* remote-udi.c (download): Skip zero length sections.
-rw-r--r-- | gdb/remote-udi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index e04225a..a17913f 100644 --- a/gdb/remote-udi.c +++ b/gdb/remote-udi.c @@ -1058,6 +1058,11 @@ download(load_arg_string, from_tty) section_size = bfd_section_size (pbfd, section); section_end = To.Offset + section_size; + if (section_size == 0) + /* This is needed at least in the BSS case, where the code + below starts writing before it even checks the size. */ + continue; + printf("[Loading section %s at %x (%d bytes)]\n", section_name, To.Offset, @@ -1119,6 +1124,8 @@ download(load_arg_string, from_tty) unsigned long zero = 0; /* Write a zero byte at the vma */ + /* FIXME: Broken for sections of 1-3 bytes (we test for + zero above). */ err = UDIWrite ((UDIHostMemPtr)&zero, /* From */ To, /* To */ (UDICount)1, /* Count */ |