From 981a33093328ee54fb095007f733bea3a1dbe5bf Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Thu, 7 Oct 1993 16:42:08 +0000 Subject: * blockframe.c (find_pc_partial_function): Fix handling for PCs beyond the end of the last function in an objfile. * coff-solib.c (coff_solib_add): Use BFD to get fields from .lib section. * infrun.c (wait_for_inferior): Modify test for subroutine entry to include pc out of bounds of the previous function. * remote.c (remote_wait): Use strtoul for parsing 'N' message. Add code to relocate symfile_objfile->sections. --- gdb/coff-solib.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gdb/coff-solib.c') diff --git a/gdb/coff-solib.c b/gdb/coff-solib.c index d6ea645..a4bf6c4 100644 --- a/gdb/coff-solib.c +++ b/gdb/coff-solib.c @@ -61,8 +61,8 @@ coff_solib_add (arg_string, from_tty, target) unsigned char *lib; struct libent { - long len; - long unk; + bfd_byte len[4]; + bfd_byte unk[4]; char filename[1]; }; @@ -76,10 +76,13 @@ coff_solib_add (arg_string, from_tty, target) { struct libent *ent; struct objfile *objfile; + int len; ent = (struct libent *)lib; - if (ent->len <= 0) + len = bfd_get_32 (exec_bfd, ent->len); + + if (len <= 0) break; objfile = symbol_file_add (ent->filename, from_tty, @@ -87,8 +90,8 @@ coff_solib_add (arg_string, from_tty, target) 0, /* not mainline */ 0, /* not mapped */ 0); /* Not readnow */ - libsize -= ent->len * 4; - lib += ent->len * 4; + libsize -= len * 4; + lib += len * 4; } } } -- cgit v1.1