home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,743 of 4,255   
   mutazilah@gmail.com to Dan Cross   
   Re: gcc 3.2.3 bug?   
   02 Apr 23 14:27:02   
   
   From: muta...@gmail.com   
      
   On Sunday, April 2, 2023 at 9:50:51 PM UTC+8, Dan Cross wrote:   
      
   > >Since I can't add printf at will without making the problem    
   > >go away I will insert a call to __brkpoint() into the generated    
   > >assembler to see if that enables me to track the problem down.   
      
   > It's not clear what problem you are referring to. You asked    
      
   Sorry - yeah, the original problem was that I could printfs   
   into this code, and it wasn't reaching the printfs. ie, it hung.   
      
   But adding printfs to try to isolate the problem sometimes   
   made the problem go away, so I needed to switch to   
   assembler.   
      
   It just occurred to me that I should include a __dummy   
   function so that when tracking down a problem, I can   
   replace brkpoint with dummy if that's what is required   
   to preserve an environment.   
      
   > whether there was a compiler bug, but it appears there is not;    
   > at least not in this case.    
   >    
   > Generally, it would help if you stated what the actual problem    
   > you need assistance with is.    
      
   The actual problem was when I did:   
      
   copy d:pdos.exe pdos.sys   
      
   on my old computer with a BIOS, PDOS hung.   
      
   I can't report that problem here. I need to debug it myself.   
      
   I had isolated the rough area where the freeze was   
   occurring. It was beyond the ability to debug with   
   printf. And I misunderstood the assembler. That   
   was the help I needed and received, thanks.   
      
   Robert has been working on ld86 for hours, trying   
   to determine what the issue is, and hasn't yet agreed   
   that the problem isn't with as386 (from the binutils   
   I provide).   
      
   > Instead of adding a call to a builtin function, perhaps    
   > consider inserting an `int3` instruction.    
      
   Good point. I am normally working from C so I put in   
   a call. It never occurred to me that now that I was   
   using assembler I could directly code int3.   
      
   Note that brkpoint isn't really a builtin function - it's   
   something I added to pdpclib.   
      
   > >[snip]   
   > > andl $-16, %edx ; only want low 4 bits of dl    
   > > ; buf[offset + 3] = buf[offset + 3] & 0xf0;   
      
   > No. This _clears_ the low bits of `%edx`: -16 in two's    
   > complement is 0xFFFFFF00. The assignment is done later.    
   > What this code says is that you only want the _high_ bits    
   > of `%edx`.    
   >    
   > >[snip]   
   > > movb %dl, _buf.8+3(%ecx) ; those low 4 bits now available for insert   
   > _high_ bits.    
      
   Thanks, fixed.   
      
   BFN. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca