- supply_register (regno, regs);
- }
- break;
- }
- else if (buf[0] == 'N')
- {
- unsigned char *p1;
- bfd_vma text_addr, data_addr, bss_addr;
-
- /* Relocate object file. Format is NAATT;DD;BB where AA is
- the signal number, TT is the new text address, DD is the
- new data address, and BB is the new bss address. This is
- used by the NLM stub; gdb may see more sections. */
- p = &buf[3];
- text_addr = strtoul (p, &p1, 16);
- if (p1 == p || *p1 != ';')
- warning ("Malformed relocation packet: Packet '%s'", buf);
- p = p1 + 1;
- data_addr = strtoul (p, &p1, 16);
- if (p1 == p || *p1 != ';')
- warning ("Malformed relocation packet: Packet '%s'", buf);
- p = p1 + 1;
- bss_addr = strtoul (p, &p1, 16);
- if (p1 == p)
- warning ("Malformed relocation packet: Packet '%s'", buf);
-
- if (symfile_objfile != NULL
- && (ANOFFSET (symfile_objfile->section_offsets,
- SECT_OFF_TEXT) != text_addr
- || ANOFFSET (symfile_objfile->section_offsets,
- SECT_OFF_DATA) != data_addr
- || ANOFFSET (symfile_objfile->section_offsets,
- SECT_OFF_BSS) != bss_addr))
- {
- struct section_offsets *offs;
-
- /* FIXME: This code assumes gdb-stabs.h is being used;
- it's broken for xcoff, dwarf, sdb-coff, etc. But
- there is no simple canonical representation for this
- stuff. (Just what does "text" as seen by the stub
- mean, anyway?). */
-
- offs = ((struct section_offsets *)
- alloca (sizeof (struct section_offsets)
- + (symfile_objfile->num_sections
- * sizeof (offs->offsets))));
- memcpy (offs, symfile_objfile->section_offsets,
- (sizeof (struct section_offsets)
- + (symfile_objfile->num_sections
- * sizeof (offs->offsets))));
- ANOFFSET (offs, SECT_OFF_TEXT) = text_addr;
- ANOFFSET (offs, SECT_OFF_DATA) = data_addr;
- ANOFFSET (offs, SECT_OFF_BSS) = bss_addr;
-
- objfile_relocate (symfile_objfile, offs);