masayuki2009 edited a comment on pull request #425:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/425#issuecomment-718317120


   > Very strange, what's value in other FILE's field?
   
   @xiaoxiang781216 
   
   With this PR and https://github.com/apache/incubator-nuttx/pull/1997
   stream->fs_oflags is  0.
   
   ```
   (gdb) p *stream                                                              
                                                                                
                               
   $1 = {fs_next = 0x7500706d, fs_fd = 8, fs_sem = {semcount = 0}, fs_holder = 
-32768, fs_counts = 32, fs_bufstart = 0x80000008 "", fs_bufend = 0x0, fs_bufpos 
= 0x10000010 "\240\v", fs_bufread = 0x0, fs_oflags = 0, fs_flags = 0 '\000', 
fs_nungotten = 0 '\000', fs_ungotten = "\000"}  
   ```
   
   With nuttx-9.1.0-RC2, stream->fs_oflags is not 0
   
   ```
   (gdb) where                                                                  
                                                                                
                               
   #0  lib_fwrite (ptr=ptr@entry=0x80113c2 <g_nshgreeting>, 
count=count@entry=1, stream=stream@entry=0x10000484) at 
stdio/lib_libfwrite.c:71                                                   
   #1  0x0800ea72 in fputs (s=0x80113c2 <g_nshgreeting> "\nNuttShell (NSH) 
NuttX-9.1.0\n", stream=0x10000484) at stdio/lib_fputs.c:136                     
                                    
   #2  0x080054a4 in nsh_session (pstate=pstate@entry=0x10000de0, 
login=login@entry=1 '\001') at nsh_session.c:104                                
                                             
   #3  0x08005240 in nsh_consolemain (argc=argc@entry=0, argv=argv@entry=0x0) 
at nsh_usbconsole.c:349                                                         
                                 
   #4  0x080050e0 in nsh_main (argc=<optimized out>, argv=<optimized out>) at 
nsh_main.c:182                                                                  
                                 
   #5  0x08001e9a in nxtask_start () at task/task_start.c:146                   
                                                                                
                               
   #6  0x00000000 in ?? ()                                                      
                                                                                
                               
   (gdb) p *stream                                                              
                                                                                
                               
   $2 = {fs_fd = 1, fs_sem = {semcount = 1}, fs_holder = 0, fs_counts = 0, 
fs_bufstart = 0x100018b0 "", fs_bufend = 0x100018f0 "mkrd    P", fs_bufpos = 
0x100018b0 "", fs_bufread = 0x100018b0 "", fs_oflags = 22, fs_flags = 4 '\004', 
fs_nungotten = 0 '\000', fs_ungotten = "\000"}    
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to