Is there a way to see the raw bytes in disassembly view? - simics

Is there a way to see the raw bytes of assembly instructions in the disassembly view? (One of the downsides of the HTML documentation is that it doesn't seem to be searchable?)
Also, is Simics Eclipse even an option for the free preview? (It seems like it maybe the Eclipse view could show raw bytes.) I don't see it listed in the base packages.

On the CLI, there is a "disassemble-settings", which can turn on to show OpCode
disassemble-settings opcode = on

Related

Debug .hex file with STM32CubeIDE

I am quiet new to STM32 developement.
I made a custom .hex file, which corresponds to my binary file with a CRC at a given address. To achieve this, I followed this instructions.
Right now, I am stuck at step 11, where the author tells STM32CubeIDE to debug current project with its custom .hex file instead of standard .elf file.
My problem is that this instructions are quiet old and IDE's UI is different now. How can I achieve this step with latest STM32CubeIDE version ? (1.6.1 at time of writing)
Thanks.
It is quite simple.
Create HEX
Manually flash it
Start debugging the normal way. Simply do not let openOCD or ST-LinkGDBServer to flash the chip.
Enjoy.
I have got the same problem, and my solution is to use stm32cubeProgrammer. It can't show the debug information, so I use usart to show the CRC result.

How to reveal line level profiling in JS sources?

I've read this article about analyzing runtime performance. The image below is copied from this article. If you check this image, there are yellow highlighted execution time hints for JS files next to each line in the file.
I find this line level profiling feature pretty useful and I would like to try it in my own projects, too.
However, when I open a JS source file in the sources tab, I cannot see it. Note that, I already took a performance profiling snapshot. But still I cannot see this execution time hints.
How can I reveal this feature?
Thanks.
it's seems that it's removed to new tab.
you can try this:
open javascript profile tab (or ctrl+ shift + p on win and type javascript profile)
start to record the site and refresh
stop the record
click on one of the js file
enter image description here
you got exactly what you need
enter image description here
I wasn't seeing the line by line timings from the profiler either, and it was driving me crazy for days.
My code was written in typescript and converted to JScript with source maps using esbuild.
When I turned source maps off in esbuild, the line timings reappeared from the profiler!
The Jscript is close enough to the Typescript so the line timings are still useful.
I could have sworn I'd seen it work with source maps in the past but now I'm not so sure. It would be great if the line timings did work with source maps but it kind of makes sense that they don't.
Has anyone else seen profiler line timings work on code with sourcemaps turn on?

MS Sandcastle - Is there any quick way to "preview" what the output will be without recompiling the entire help?

Well, the title asks it all.
I have the Sandcastle Help File Builder GUI. I can generate help files, but I was wondering if there was a faster way of seeing the results aside from recompiling the entire help file.
I asked about Sandcastle because other tools I've tried that offer a preview feature don't compile help files to the exact specification as does Sandcastle. Most of them require fully qualified references, which is a pain in the butt.
No, there is no preview capability but there are some SHFB settings that allow you to dramatically reduce build time. In my case, my 16 to 18 minute build was reduced to 3 minutes.
What you want to adjust are the Cached Build Components. And fear not, adjusting these 3 components requires no arcane manipulations or complex gyrations.
Simply go to the Build section in the SHFB GUI, and find the line near the top labeled ComponentConfigurations.
Click on the value field to reveal a hidden ellipsis (...) button.
Click that button to open the Select and Configure Build Components dialog.
Select in turn each of the three entries beginning Cached... and select the Add action.
These require no configuration so close out the dialog and if successful the main SHFB window should now indicate 3 custom build component(s).
Be sure to review the documentation at the above link for more details.
Just for completeness, two other items of interest:
Take a look at this forum post (Sandcastle build is taking hours to complete) that discusses how your hardware can have a tremendous impact on Sandcastle build time as well.
Take a look at my article Taming Sandcastle: A .NET Programmer's Guide to Documenting Your Code on Simple-Talk.com that discusses quite a lot of tips and pitfalls of Sandcastle and SHFB--ironically I uncovered my tip here about cached build components after that article went to press so you will not find it in there!
In SandCastle GUI, go to menu Window and open Topic Previewer Window.
If you have Visual Studio and the Sandcastle VSiX extension installed, go to the Visual Studio menu View > Other Windows and click on Topic Previewer Window.
See https://ewsoftware.github.io/SHFB/html/d3c7584d-73c0-4725-87f8-51e4ad956694.htm.

Character sets offered in the Eclipse properties

I've just been handed a pile of Java source that, I suspect, is in ISO-8859-8. Eclipse's menu of charsets, here on my Mac, does not include that. Or any of a wide variety of other encodings supported by the JDK.
Is there a recipe for expanding the list of encodings that show up in the menu?
You can just type it in manually. From Edit->Set Encoding..., simply type in ISO-8859-8. Only a few are listed, but it will accept any that your Java runtime accepts. After you choose it once, it should be listed in the drop-down combobox after that.
See Supported Encodings for more information on which sets are supported by Java.
If it's not the Set Encoding action you're trying to run, please give more information of what steps you're taking to get to the "menu of charsets."

How to Change Netbeans Fonts and Colors Preview Document?

Within the Netbeans 6.5's Tools -> Options -> Fonts & Colors -> Syntax dialog, you have the ability to change the look and feel of the Netbeans text editor. When you select a language, you are presented with a preview of your font/color scheme. However, when I preview Java, there are far more options for syntax changes than are being displayed in that preview window. If I were able to view a more robust piece of code, I'd be able to see the immediate effect of more of the options.
How can I supply a preview document to view my font/color changes?
UPDATE:
After looking into this some more, I've been able to narrow down the problem a bit. From what I can tell, everything in Netbeans is considered a plugin. The GUI editor is a plugin, and even the text editor is a plugin. This means that what ever piece of Netbeans that actually analyzes Java code and does syntax highlights is also a plugin (since Java is just one of many languages Netbeans highlights, it makes sense this is a plugin).
I think fromvega is on the right track with his suggestion. The tutorial for creating a manifest file editing plugin pointed me in the right direction. The tutorial eludes to a file used as a sample document used for font/color previews. It tells you how to create one inside this new plugin project. (Located in "Registering the Options in the NetBeans System Filesystem", part 4. About 4/5 of the way down the page.)
My next line of thought was to look for the Java syntax editing mode plugin and find this file and update it with a richer example file. I looked in the installation directory and came up empty, but I found what looks like the appropriate files within my user settings directory. There is a config directory with a lot of subfolders within my user directory (Windows: C:\Documents and Settings\saterus.netbeans\config).
I've been poking around inside this directory a bit, but have only found the xml files the manifest tutorial talks about. I have been unable to find the extensionless sample file for the Java plugin that I believe should be there.
Since I've hit a brick wall for the moment, I thought I'd toss it back to the SO community and see if you guys might make the last leap and find the solution.
Just for anyone who wants to alter this themselves it is possible on a unix machine to use grep to locate the file i.e.
grep -lr "some part of the current sample code" /path/to/netbeans
I used this method to locate the ruby example filename and from that identified that it is kept in org-netbeans-modules-ruby.jar as a file called RubyExample. By simply altering that file I was able to construct a better sample file for my own use.
Hope this helps someone!
The document which is displayed (for each mime type) is specified in a particular folder in the "system file system" (which is a NetBeans concept which is a virtual file system composed from contributions from individual modules; this is how functionality is dynamically registered in NetBeans).
Modules typically specify their system file system contributions in a file named "layer.xml" in the plugin. The create plugin templates typically offer to create this for you.
For example, here's how the Python example is registered:
<filesystem>
...
<folder name="OptionsDialog">
<folder name="PreviewExamples">
<folder name="text">
<file name="x-python" url="PythonExample.py"/>
</folder>
</folder>
...
Here, PythonExample.py is a sample file in the same directory as the layer file.
Therefore, what you need to do is create a plugin which overrides the existing registration(s) for the mime type(s) you care about and provide alternate sample documents. You may need to hide the existing registration first (see the _hidden
part from http://doc.javanb.com/netbeans-api-javadoc-5-0-0/org-openide-filesystems/org/openide/filesystems/MultiFileSystem.html ).
Hopefully this guides you in the right direction.
However, in thinking about it, we probably ought to make the preview area editable - so people can cut & paste whatever codefragment they care about right in there. This wouldn't be persistent, so whenever you change languages you get the original samples back - but it provides a quick way to see your own code. This shouldn't be just for the Fonts & Colors customization, but for the Formatting preview panels as well.
I've filed an issue against NetBeans for this:
http://www.netbeans.org/issues/show_bug.cgi?id=155964
-- Tor
I think you can only accomplish that with a new plugin, since you need somekind of parsing to define what is what.
Give a look a these tutorials, I haven't read them in details but they seem to show you how to do what you want:
http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
http://www.antonioshome.net/kitchen/netbeans/nbms-coloring.php