getting the PDG graph - frama-c

I'm developing a plugin in Frama-C and I want to get the Pdg graph from the C program.
I tried the Db.Pdg.get which takes "kernel_function" type while I have a "funcdec" type. I didn't know how I fix that.
Any help?

You can use Globals.Functions.get fdec.Cil_types.svar to convert a fundec fdec into a kernel_function. Calling Db.Pdg.get is then the right way to go.

Related

How to create Multi Type Charts with pptxgenjs

I am using PptGenJs (https://gitbrent.github.io/PptxGenJS/docs/api-charts/) to create a Multi Type Chart (a bar and a line in the same chart) in my Angular application. I am testing the demo code from the PptGenJs-Github-Repo, which you can find it here: https://github.com/gitbrent/PptxGenJS/blob/master/demos/modules/demo_chart.mjs#L1715
I am surprised to find that it doesn't work in my case. I have PptGenJs Version of 3.10.0 and Angular Version of 13.2.0.
The problems are:
charts are not found in "type: pptx.charts.BAR". Instead, I have to change it to "type: pptx.ChartType.bar"
the method of "slide.addChart(chartTypes, opts)" shows error. It seems that the parameter of "data" is missing according to its documentation:
addChart(type: CHART_NAME | IChartMulti[], data: any[], options?: IChartOpts): Slide
I must have done something wrong, but have no idea. Could anyone help me? Many thanks.
regards,
CC

Adobe AEM Querybuilder Debugger - Multiple Paths and Multiple Nodenames

I am using querybuilder debugger and want to do a search where "nodename=.pdf OR nodename=.doc*" and "path=/content/dam/1 OR path=/content/dam/2".
I have been trying to find an example but no luck on the web. What I have below is not quite right - just wondering what I am missing.
The query does work but there is a huge difference in the amount of time that it runs when compared with when I just query using one nodename instead of 2.
Thanks in advance,
Jerry
type=dam:asset
mainasset=true
1_group.p.or=true
1_group.1.nodename=*.pdf
1_group.2.nodename=*.doc*
2_group.p.or=true
2_group.1_path=/content/dam/1
2_group.2_path=/content/dam/2
p.limit=-1
orderby=path
I thought maybe something as simple as this might work but no luck....
type=dam:asset
mainasset=true
group.p.or=true
group.1_nodename=*.doc*
group.1_path=/content/dam/1
group.2_nodename=*.doc*
group.2_path=/content/dam/2
group.3_nodename=*.pdf
group.3_path=/content/dam/1
group.4_nodename=*.pdf
group.4_path=/content/dam/2
p.limit=-1
orderby=path
Try splitting your query if this won't affect the behaviour you're trying to achieve.
path=/content/dam/1
type=dam:asset
mainasset=true
group.1.nodename=*.pdf
group.2.nodename=*.doc*
p.limit=-1
orderby=path
path=/content/dam/2
type=dam:asset
mainasset=true
group.1.nodename=*.pdf
group.2.nodename=*.doc*
p.limit=-1
orderby=path

Where can I find all command functions of Atom editor?

I can't find anywhere on the internet. I made some custom key bindings using stuff like:
editor = #getModel()
bufferRow = editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition()).row
if editor.isFoldedAtBufferRow(bufferRow)
editor.unfoldBufferRow(bufferRow)
else
editor.foldBufferRow(bufferRow)
and
atom.workspace.getActiveTextEditor()?.selectAll()
atom.workspace.getActiveTextEditor()?.pasteText()
atom.workspace.getActiveTextEditor()?.save()
But I had to search so much. No list of all functions to use?
PS: Best thing close to it for me was: https://gist.github.com/philipmadeley/1fb35efdf5ab639c12c6
Atom has an abundance of documentation over at https://atom.io/docs/
More specifically, this would be what you were looking for:
https://atom.io/docs/api/v1.16.0/TextEditor

AutoIt #ComSpec parameters (/c, /k...)

I'm new to AutoIp and wonder what the parameters that often come with the #ComSpec macro mean. I couldn't find an explanation on the web. So any hint regarding /c, /k and maybe others?
Thanks a lot.
#ComSpec is the value of %COMSPEC%; the specified secondary command interpreter.
(For example: C:\Windows\system32\cmd.exe)
A quick search on "cmd.exe arguments" should give you plenty of info.

IDA assembly patching fails with "cannot reach destination from current location"

I'm a newbie in IDA (and reverse engineering).
I'm trying to use the "patch->assembly" option in the edit->patch menu, but it fails with an error I cannot understand.
My current line is "jnz short func" (where func is a label I renamed from loc_xxxx), and I am trying to change it to "jmp short func", but when I click OK I get a message box with the message: "cannot reach destination from current location".
Can anyone explain What does that mean and why doesn't it work? I tried to search all over and I can't find any answer!
I must also add that I'm doing this as part of an IDA tutorial I found (in tut4you.com).
Thanks again for your help, I'm really stuck with that!
"jnz short func" and "jmp short func" instructions doesn't have the same number of bytes..Try to keep code alignment with the original code..
Also jnz, jz, ja,..(conditional jumps) don't work with far pointers (i.e. intersegment).. but only jmp..

Resources