📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  C header parsing?

Topic created on: February 22, 2006 09:52 CST by aeppert .

Has anyone put forth effort in parsing C header files and producing proper IDA enums and structures?  I have been running into this situation quite frequently in the last 6 months and have come to the conclusion my time is being wasted and I should just write a parser.  Anyone else happen to have started one?

h2enum is not substantial enough unfortunately.

  aeppert     February 22, 2006 11:06.08 CST
Just as a follow-up -- While I realize IDA has the built in C header parser, it is often requires more massaging than desirable to make it actually import header files, thus the reasoning behind the question.

  pedram     February 22, 2006 16:05.46 CST
I thought that maybe FX wrote one to accompany his dumbug release (the ltrace portion of it), but looking through the release I guessed wrong. I could have sworn he had one though. Anyone else remember this?

Funny as I recently had this problem as well when using h2xml during the creation of PyDbg. In my case it wasn't enough manual labor to warrant a search for a real parser though.

  caviola   March 10, 2006 11:05.46 CST
some time ago I started a full-fledged C/C++ parser but I stopped development because I wasn't sure how I was going to profit from it. sorry guys but I badly needed some bucks and I displaced efforts to where money was expecting me. I only finished the lexer and preprocessor. the hardest part, the parser, is still unfinished. but i'm willing to resume development is it'$ worthwhile.

  plop     April 11, 2006 15:55.13 CDT
http://www.gccxml.org may be the solution you're looking for.  As the name implies, it uses the gcc compiler to parse C/C++ and outputs XML which should be a lot easier for you to parse.

Example usage can be found in the Python ctypes code generator:
http://starship.python.net/crew/theller/ctypes/codegen.html

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit