is it possible to debug a single cmd.exe build under win32 xp
I did a make cmd only, just to test the compatabilty of the generated cmd.exe.
Because I found some strange effects on some of my .cmd files, I was wondering if there was a
simple way to see the TRACE() output lines in the sources from the cmd.exe
debug cmd.exe build only
Moderator: Moderator Team
Re: debug cmd.exe build only
Never mind. I have got it working.
I used the cmd source files to create a new project, and adapted some sourcecode to get it working in vc++
I now have a 130kb cmd.exe which is working correctly in windows xp
It is very interesting to see how everything works.
I have done lots of tests, and so far I can see it is workng 100% correctly.
I have made some small adaptions, making tracelogging work dynamic, and loading/executing a batch file from memory, avoiding filelocks and fileread actions during execution.
Thx
I used the cmd source files to create a new project, and adapted some sourcecode to get it working in vc++
I now have a 130kb cmd.exe which is working correctly in windows xp
It is very interesting to see how everything works.
I have done lots of tests, and so far I can see it is workng 100% correctly.
I have made some small adaptions, making tracelogging work dynamic, and loading/executing a batch file from memory, avoiding filelocks and fileread actions during execution.
Thx
- EmuandCo
- Developer
- Posts: 4723
- Joined: Sun Nov 28, 2004 7:52 pm
- Location: Germany, Bavaria, Steinfeld
- Contact:
Re: debug cmd.exe build only
Source might be interesting for us ...
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.
If my post/reply offends or insults you, be sure that you know what sarcasm is...
If my post/reply offends or insults you, be sure that you know what sarcasm is...
Re: debug cmd.exe build only
Of course, Goplat made a cool job and cmd.exe was my first area here in Ros.i made a couple fixes with several commandsHansH wrote:
It is very interesting to see how everything works.
I have done lots of tests, and so far I can see it is workng 100% correctly.
Thx
Yeah please create s bugreport and add your enhancements
Re: debug cmd.exe build only
Perhaps some info first, to see if it is interesting for you:
Because I made a seperate project in vc++, I could define an alternate definition for TRACE()
Just pointed it to a custom trace function which default does nothing.
if inside the cmd.exe a certain environment var is set, the trace function starts to output the TRACE info until the environment var is unset again.
No idea if this is possible within the reactos environment.
The other thing I did, is to load the full batch file into memory.
The current way is to open a file and keep it open during processing and use SetFilePointer to navigate.
With an internal call, the file is again opened
My change is to add some vars in the bc structure and to read the batchfile into memory and to add some logic into the batch function
to prevent that the same filename is reread again, So that way no file is kept opened or locked.
The downside it costs you memory.
So if this is interesting, i will post the enhancements/changes as a bugreport tomorrow.
great source....learned a lot again
Hans
Because I made a seperate project in vc++, I could define an alternate definition for TRACE()
Just pointed it to a custom trace function which default does nothing.
if inside the cmd.exe a certain environment var is set, the trace function starts to output the TRACE info until the environment var is unset again.
No idea if this is possible within the reactos environment.
The other thing I did, is to load the full batch file into memory.
The current way is to open a file and keep it open during processing and use SetFilePointer to navigate.
With an internal call, the file is again opened
My change is to add some vars in the bc structure and to read the batchfile into memory and to add some logic into the batch function
to prevent that the same filename is reread again, So that way no file is kept opened or locked.
The downside it costs you memory.
So if this is interesting, i will post the enhancements/changes as a bugreport tomorrow.
great source....learned a lot again
Hans
- Davy Bartoloni
- Posts: 1485
- Joined: Wed Jan 04, 2006 11:31 pm
- Location: Cuneo
- Contact:
Re: debug cmd.exe build only
it would be nice
Re: debug cmd.exe build only
Ok,
bugreport 5806 : dynamic TRACE output to cmd console
bugreport 5807 : Replace FILE IO with Memory IO for batchfiles.
bugreport 5806 : dynamic TRACE output to cmd console
bugreport 5807 : Replace FILE IO with Memory IO for batchfiles.
Re: debug cmd.exe build only
The files you attached are not the proper patches. Please checkout a ReactOS trunk source tree and introduce the changes there. Then please make sure it compiles and works correctly. Finaly, please create a DIFF file for reach bugreport/feature and attach it to bugzilla, to the reports you have already opened.
Re: debug cmd.exe build only
Aahh, mist that one ....
Patches are now attached, diff are done against the trunk
Patches are now attached, diff are done against the trunk
Who is online
Users browsing this forum: No registered users and 1 guest