Does anybody know how to change font in one particular line in disassembly view of WinDbg?
It looks like this:
If to scroll it up or down, still the selected line is outstanding from every other line. However if to load workspace explicitly via "File -> Open workspace..." (Ctrl + W) then the line is the same as any others.
Why does it happen?
Related
I've been using xcode for some months and this has never happened before, i'm not sure whether i pressed something i shouldn't have or meddled with the settings. Basically i write something like for(int i=1;i<=n;i++) and press enter, and the cursor is on the next line above the instruction, so there's no visual subordination of what I'm about to write next.
If i press the tab key before writing a new instruction below and then write for instance cout<<n-i<<endl;, the moment I press ; , the entire thing is moved in the same column(if that makes sense) again. This doesn't happen with other instructions like while or if. Help?
Normally indentation occurs when you open a block, as in type {. If you're using a blockless if then the code editor has to figure out after the fact what you're doing.
I'm not able to reproduce your problem, but here are a few tips :
To format a selection in the editor
Main menu : Editor > Structure > Re-indent ( or ^I )
To remove the automatic formatting when pressing ;
User Preferences : Text Editing > Automatic indent for : Uncheck the “;” box
So I finally decided to bite the bullet and rewrite my company's terrible Trace32 scripts. I'm trying to use a data file to save the pertinent information between runs so we can just run a Redo script to repeat any action without having to navigate a mess of dialog boxes and select our workspace files after every power cycle. In order to do this, I will need to save the user defined variables from the previous run (including file locations) to file so I have them in the next run. For reference, here is a part of my menu script.
; File: Do.cmm
GLOBAL &WORKSPACE
GLOBAL &FILETOLOAD
GLOBAL &TARGETSELVAL
&WORKSPACE="//tsclient\Z\Product_trunk_MS" ; Not the ideal solution
PRINT "Workspace is &WORKSPACE"
DIALOG
(
HEADER "Do one of the following"
POS 0. 0. 23.
COMMAND.PREVIOUS: CHOOSEBOX "Repeat Last Command" ""
POS 24. 0. 23.
COMMAND.WORKSPACE: CHOOSEBOX "Change Workspace Location" ""
POS 0. 3. 25.
TEXT "Connect To an R7 Proc:"
POS 0. 4. 6.
COMMAND.IP0: CHOOSEBOX "IP0" ""
POS 8. 4. 7.
COMMAND.IP1: CHOOSEBOX "IP1" ""
; And a lot more of the same...
POS 17. 16. 15.
DEFBUTTON "OK" "continue"
)
DIALOG.SET COMMAND.PREVIOUS
STOP
IF DIALOG.BOOLEAN(COMMAND.IP0)
(
&TARGETSELVAL=0x00030000
&FILETOLOAD="&WORKSPACE\CPUs\IP0\build\output\IP0.axf"
)
IF DIALOG.BOOLEAN(COMMAND.IP1)
(
&TARGETSELVAL=0x0003001
&FILETOLOAD=&WORKSPACE\CPUs\IP1\build\output\IP1.axf
)
... And so on
The problem with this is that I have to edit the script every time I change workspaces. I want to be able to set this in the script above by selecting COMMAND.PREVIOUS and then selecting my new workspace root with the Windows selection dialog. I don't have a working implementation for that function, but I want it to look something like this:
IF DIALOG.BOOLEAN(COMMAND.WORKSPACE)
(
PRINT "Select the new root directory that you would like to work out of."
OPEN #1 workspace.dat /Create
&WORKSPACE= C/*/ ; I don't know how to do this here.
WRITE #1 &WORKSPACE
CLOSE #1
ENDDO
)
Obviously, Data.load.binary "*.bin" is able to load a file to memory, but I don't need the file loaded yet, I just want the path. I did find that symbol.SOURCEPATH.SETBASEDIR c:\* will open a dialog box, but I am still having trouble getting at that information.
Additional Info
I have read through a lot of this and this while trying to find a solution. If there is a built in path variable that I should be using (like the aforementioned SOURCEPATH.SETBASEDIR, I wouldn't mind doing that instead. This is my first day writing Trace32 scripts, so I apologize in advance for my naivete. If it matters, I am using Trace32 Powerview for ARM Release Feb 2017 SP2 (32 bit) (So, the latest)
TRACE32 has the concept of a working directory. The command ChDir can be used to change the current directory:
ChDir <path>
The current working directory can be retrieved with the PRACTICE function OS.PWD():
&WORKSPACE=OS.PWD()
The script example above could be extended like this:
IF DIALOG.BOOLEAN(COMMAND.WORKSPACE)
(
PRIVATE &old_directory
&old_directory=OS.PWD() // Save current directory
ChDir * // Open directory selection dialog
&WORKSPACE=OS.PWD() // Update working directory
OPEN #1 workspace.dat /Create
WRITE #1 &WORKSPACE
CLOSE #1
ChDir &old_directory // Restore previous directory selection
)
I ended up finding a solution to my problem that was a little different than xasc's, so I thought I'd share it.
IF DIALOG.BOOLEAN(COMMAND.WORKSPACE)
(
PRINT "Select the new root directory that you would like to work out of."
DIALOG.DIR *
ENTRY %LINE &WORKSPACE
OPEN #1 workspace.dat /Create
WRITE #1 "&WORKSPACE"
CLOSE #1
)
This was a little cleaner for my purposes because it didn't require me to change the working directory.
DIALOG seems to be the interface I was looking for, with the ability to open files, directories, and more and save them into variables.
DBMS_OUTPUT.PUT_LINE( ) doesn't print output however output and spooling are turned on. "Procedure is completed successfully" message is displayed without any output. When run in SQLPLUS it throws errors.
Do you have any idea to check? I tried the DBMS_OUTPUT.ENABLE() etc.
Make sure you "execute as a script" by pressing F5. Make sure the editor window has this line before calling your procedure:
set serveroutput on size unlimited;
Here is an example calling a homegrown function that returns an element from a list (in this case the 6th element, "mirror") where the delimiter is a space. Note you can view output on the "DBMS Output" tab too (click the "turn output on" button first).
Click on the image to view full size
i found this little tricky button in jetBrains Datagrip, it turns on dbms_output without any dbms_output.enable or set serveron etc.
I have a command line being executed in my C++ code that states:
CString sCmd = "NOTEPAD /P myfile.txt";
WinExec(sCmd, SW_HIDE);
The file prints out but at the top of each page is the text, centered, "myfile.txt", next line the beginning of my file text.
Is there a way to eliminate the file title on each page of the print out and/or at least but a blank line between the title and the beginning of the text?
Thanks
This seems like an example of an XY problem.
There is no command line option for Notepad that will change or remove the page header. Notepad will remember your configured page settings though, so you could start Notepad manually, set header and footer in Page Setup, quit, then program will print using your presets.
Or, why not just use the Windows print console tool, instead of Notepad?
WinExec("cmd.exe /c print /d:\\servername\printername filename.txt", SW_HIDE);
I'm using WinDBG and have the following stack trace:
ntdll!NtTerminateProcess+0xa
KERNELBASE!TerminateProcess+0x2f
MSVCR90!_invoke_watson+0x11c [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c # 234]
MSVCR90!_invalid_parameter+0x70 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c # 115]
MSVCR90!fgetpos+0x33 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\fgetpos.c # 45]
CleanPayload!DoSomething+0x22 [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp # 68]
CleanPayload!main+0x1c [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp # 115]
CleanPayload!__tmainCRTStartup+0x11a [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c # 586]
kernel32!BaseThreadInitThunk+0xd
ntdll!RtlUserThreadStart+0x1d
Clearly the debugger knows what line of code each stack frame points to, as it shows that number after the '#'. I'm glad that I can hit crtl-l on the source pane and type in the line number, but why can't it do this for me? Is there a way to click on the debug window and say "jump to this point in source" without me having to type it in myself?
It can do this, just not from any window. It works from Call Stack window (Alt+6) -- double click on the frame that has mapped to the line of code and it will get you to the line in source file. It opens the file if it is not currently opened in WinDbg.