www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/19/23:32:27

From: Martin DOT Stromberg AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Bug in gdb's go32targ.c, found after bug in dbgcom.c
Date: 19 Feb 1998 13:41:35 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 65
Message-ID: <6chcqf$nou$2@antares.lu.erisoft.se>
NNTP-Posting-Host: juno.lu.erisoft.se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ok, next patch. After I corrected dbgcom.c, gdb didn't crash trying the
command p *(short *)-1, instead it prints something that must be bogus
as the memory in question is unavailable:

(gdb) p mnt
$1 = (struct mntent *) 0xffffffff
(gdb) p *mnt
$2 = {mnt_fsname = 0xfffffff0 "\200Y\022", mnt_dir = 0x2e29544e "\200Y\022", 
  mnt_type = 0xa "\200Y\022", mnt_opts = 0x0, mnt_freq = 0, 
  mnt_passno = 353984, mnt_time = 0}


Here's a patch to correct this. Who should I send this to? Robert Hoehne?
Delorie?


Thanks,

							MartinS

diff -r -c3 gdb.org/gnu/gdb-4.16/gdb/go32targ.c d:gdb/go32targ.c
*** gdb.org/gnu/gdb-4.16/gdb/go32targ.c	Sun Sep  8 19:46:46 1996
--- d:gdb/go32targ.c	Thu Feb 19 02:57:00 1998
***************
*** 270,279 ****
    printf_unfiltered("go32_xfer_memory %x %x %d %d\n", memaddr, myaddr, len, write);
  #endif
    if (write)
!     write_child(memaddr, myaddr, len);
    else
!     read_child(memaddr, myaddr, len);
!   return len;
  }
  
  /* ----------------------------------------------------------------------------- */
--- 270,297 ----
    printf_unfiltered("go32_xfer_memory %x %x %d %d\n", memaddr, myaddr, len, write);
  #endif
    if (write)
!     {
!       if(write_child(memaddr, myaddr, len))
! 	{
! 	  return(0);
! 	}
!       else
! 	{
! 	  return(len);
! 	}
!     }
    else
!     {
!       if(read_child(memaddr, myaddr, len))
! 	{
! 	  return(0);
! 	}
!       else
! 	{
! 	  return(len);
! 	}
!     }
!   
  }
  
  /* ----------------------------------------------------------------------------- */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019