I would like to use Radare2 to learn about how C is assembled into assembly but I am having trouble with the layout. I think the V! mode would be very handy as you can watch the registers update as the instruction pointer moves through the program, but I don't understand the layout.
This is an example of they layout I would like:
It seems when I add a window (like Stack or Registers in this photo) it appears offscreen and I have to try closing different and splitting windows until the layout kind of falls into place. Is there an easy way to change exactly what is in each window?
I know "X" closes a window, "z" switches the current window to the front, and "-" / "|" split a window.
I have tried looking at the help but can't seem to figure out any other commands related to this issue.
ENVIRONMENT
radare2: 4.2.0-git 23712 # linux-x86-64 git.4.1.1-97-g5a48a4017
commit: 5a48a401787c0eab31ecfb48bebf7cdfccb66e9b build: 2020-01-09__21:44:51
system: Ubuntu 18.04.3 LTS
SOLUTION
This problem can be solved in a variety of ways and this is just one example.
To create the layout you have described change the commands shown in the default layout by:
Clicking inside/selecting the panel you wish to change.
Right clicking in the panel and select new command or
Enter "e" then type the new command. (Ex: Registers = dr)
The further documentation shown below can be found here: https://radare.gitbooks.io/radare2book/visual_mode/visual_panels.html
|Visual Ascii Art Panels:
| | split the current panel vertically
| - split the current panel horizontally
| : run r2 command in prompt
| _ start the hud input mode
| ? show this help
| ?? show the user-friendly hud
| ! run r2048 game
| . seek to PC or entrypoint
| * show pseudo code/r2dec in the current panel
| / highlight the keyword
| ( toggle snow
| & toggle cache
| [1-9] follow jmp/call identified by shortcut (like ;[1])
| ' ' (space) toggle graph / panels
| tab go to the next panel
| a toggle auto update for decompiler
| b browse symbols, flags, configurations, classes, ...
| c toggle cursor
| C toggle color
| d define in the current address. Same as Vd
| D show disassembly in the current panel
| e change title and command of current panel
| g go/seek to given offset
| G show graph in the current panel
| i insert hex
| hjkl move around (left-down-up-right)
| J scroll panels down by page
| K scroll panels up by page
| H scroll panels left by page
| L scroll panels right by page
| m select the menu panel
| M open new custom frame
| nN create new panel with given command
| pP seek to next or previous scr.nkey
| q quit, back to visual mode
| r toggle jmphints/leahints
| sS step in / step over
| t rotate related commands in a panel
| uU undo / redo seek
| w start Window mode
| V go to the graph mode
| X close current panel
| z swap current panel with the first one
EXAMPLE
Open visual panels
user#host:~$ r2 /bin/ls
[0x00005850]> aaaa
...
[0x00005850]> s main
[0x00003e90]> V!
Default view after opening visual panels
Select top right panel then right click and select registers
Select lower right panel then right click and select stack
Final view
Related
This code inserts a table and tries to center it:
Sub Macro1()
wtrows = 4
wtcols = 3
Set tbl = ActiveDocument.Tables.Add(Selection.Range, wtrows, wtcols)
tbl.Rows.Alignment = wdAlignRowCenter '' centre entire table
For i = 1 To wtrows
For j = 1 To wtcols
tbl.Rows(i).Cells(j).Range.Text = 999
tbl.Columns(j).Cells.Width = CentimetersToPoints(2)
Next
Next
End Sub
However, the table appears as left-aligned. If I select the table then Ribbon | Home | Paragraph has the Centered toggle button selected (which does not match the appearance). If I force a manual refresh by Control Home/End or toggling Show/Hide Paragraph Marks at Ribbon | Home then the table now appears correctly as centered.
I've tried by code to provoke a full refresh (eg adjust a margin) but nothing works.
How can I force the display to match the table properties?
And any advice on why this is happening?
Word version is 365 MSO (Version 2204 Build 16.0.15128.20210) 64-bit, running on latest Win10.
Thanks.
Is it possible to draw vertical lines in the editor that descend from the start of an indented statement, like in IntelliJ IDEA?
public...
| while...
| |
| | for...
| | |
Or if not natively, is there a plugin for this?
You cannot use vertical bars as indent marker character AFAIK, however, in Preferences > General > Editor > Text Editors, you can enable whitespaces markers, and tabs can be rendered as ยป , well aligned and so on, providing I believe a similar feeling than the | of intellij
I have a GWT application where the GXT Menu/MenuItem widgets are used. The menu is on the top left corner of the work area and then there are multiple levels of submenus to it:
==========================================
[-Main Menu-] ||
| Option1 | ||
------------- | Option2 > | ||
| Option2.1 | | : | || //no space to expand submenu 2; expands on left
| Option2.2 >|---------- | ||
| : |Option2.2.1| | || //Space available for submenu 2.2; expands on right,
|-----:----|Option2.2.2|----| || //therefor overlaps with Main menu options
| : | ||
|-----:-----| ||
by default, the first level submenu opens to the bottom
The second level submenu opens to the left (because there is no space on the right)
the third level submenu opens to the right thus overlapping the main menu.
Is there a way to control the behavior so that submenus at all levels keep opening to the left instead of trying to open on the right while there is space there (and opening on the left only if and only if no space is available to the right)?
Simply put, I want the opposite of what is currently happening: If there is space on left, expand on left; else expand on right.
I looked at the GXT classes MenuAppearance, MenuItemAppearance and the method Menu.setSubmenuAlignment() but nothing seems to provide what I want to do. It seems to me this would have been a common requirement which is why I am trying to look at an API solution. I do not want to extend and write the functionality myself unless that is th only way.
I have been using Indigo for a while, and now trying Juno
There is a sligth bothering difference:
On Indigo When you had 10 tabs opened
A | B | C | D | J | H | G ....(F | T | S)
and currently on B
when you selected the file shown in tab T again, then this tab (on Indigo and that's the problem not on Juno) would be repositioned like that:
A | B | T | C | D | J | H ....( G | F | S)
This is useful since, if opening T after B, it means they should be grouped together
on Juno it does not reposition them, instead you will need to find most recent files far in the tab list
Q: how to set it back? I searched params with 'tabs' in the options with no result
edit: still the same in new versions (Kepler)
edit: Thanks to Paul' answer, a good solution is to search for .css files in eclipse folder, and set swt-mru-visible property to true in e4-default-win7.css for example
Juno by default doesn't present the MRU (Most Recently Used) tab behaviour that you see in Indigo (it never worked quite right) and instead uses the Editor document order.
I believe you can re-activate it be either switching to the Classic theme in Preferences>General>Appearance or by editing the CSS. See http://wiki.eclipse.org/Eclipse4/CSS
.MPartStack {
swt-mru-visible: true;
}
Don't forget to restart Eclipse to make it use the new parameters.
Apparently this option was added in Eclipse Mars 4.5:
Window -> Preferences -> General -> Appearance ->
Visible tabs on overflow:
[X] Show most recently used tabs
Is it possible to make Eclipse place the new opened editor tab next to the currently active one?
Until the tab row is full, eclipse places the new tab on the first free position, which is acceptable. When the row gets full, eclipse chooses to hide the LRU tab, which is acceptable, too. But it places the new tab on the position freed this way, which is from the user's POV a completely random position. Extremely strange, IMHO.
An example, just in case my English is worse than I though:
Initial position, assuming b is LRU and D is active, opening G:
a b c D e f
Current behavior:
a G c D e f
Wanted behavior:
a c D G e f
I disliked the tab placement before, but I really dislike the way it works in Eclipse Juno. The Eclipse team claims that they have never gotten above 20% of their users liking a tab placement method.
Anyway, the good news is that customizing tab placement may get easier in the future, and if you dislike the current style you can go back to the old style relatively easily.
Comparison of tab placement styles
MRU style (older): The n most recently used tabs are always displayed.
Array style (newer): New tabs always go at the end of an infinite array of tabs. Then the visible set of tabs is scrolled until the selected tab is visible.
Suppose the window is sized very small, so that only 3 tabs are visible at once. Here's how the two styles will place things, given that we've already opened tabs "A" and "B" and are about to open tab "C". I'll capitalize the tab being added for visibility:
Tab | Old New
opened | Visible | Hidden | Visible | Hidden
----------------------------------------------------
C | abC | | abC |
----------------------------------------------------
D | Dbc | a | bcD | a
----------------------------------------------------
E | dEc | ab | cdE | ab
----------------------------------------------------
A | deA | bc | Abc | de
----------------------------------------------------
F | Fea | bcd | deF | abc
----------------------------------------------------
D | fDa | bce | Def | abc
Selecting a tab placement style
As described in other StackOverflow questions Eclipse tabs repositionning and Retain previous open file tab under visible tabs, it's possible to choose between the two styles by installing the Eclipse E4 CSS editor plugin and then in Preferences > General > Appearance changing
.MPartStack {
font-size: 12;
swt-simple: false;
swt-mru-visible: false;
}
to
.MPartStack {
font-size: 12;
swt-simple: false;
swt-mru-visible: true;
}
Have you read the following?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=68684
Because i remember reading about this issue.
There is no direct way achieve it. [As per my knowledge.]
As mikezx6r said in his comment: You will require to build an eclipse plugin or you can an eclipse view that works as per your need. For your information: In the Eclipse Platform a view is typically used to navigate a hierarchy of information, open an editor, or display properties for the active editor
To know how to create an eclipse view here is a tutorial kinda stuff for you.
Hope this helps.