-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys: Initial import of analytical object dump (od) module #1884
Conversation
I have no clue how this should be used. Can you provide a README? |
Isn't that what the doxygen documentation is for? Where it is unclear? The idea is to use it mainly for debug (and if we have something like a fs in the future to dump files in binary form). Just call od(&var, sizeof(var), 0, 0);
/* or */
od_dump_hex(&var, sizeof(var), 0); from whereever you need a quick overview of the bits'n'bytes in |
This was motivated mainly to find the errors in the Neighbor Discovery more easily |
Also it's inspired by od(1), but in function form and not as command-line tool. |
Doxygen says So, it's printing a piece of memory in a octal representation? |
Octal, decimal, hexadecimal, what ever you like ;-) |
better? |
👍 |
(That's not an ACK yet.) |
(Did not take it for that) ;-) |
@N8Fear please comment in the PR's file changes, not the commits. |
char foo[128];
od_hex_dump((void*) &foo, 128, 0);
foo[5] = 44;
od_hex_dump((void*) &foo, 128, 0); on native:
Looks okay. On IoT-Lab_M3:
Broken formatter? |
This looks a little bit mind-bending to me right now. Will look into it (this time for real) tomorrow. |
printf for 64-bit numbers seems to be broken on iot-lab_M3. See #1891 |
ACK |
#define __OD_H_ | ||
|
||
#include <stdint.h> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file does not have a C++ compatible header: 'sys/include/od.h'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
öhm, how do I make this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git grep extern core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git grep cplusplus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@authmillenon got it ;)
bb7a5d4
to
4ebbb76
Compare
@OlegHahm re-ACK? |
Yes, squash and go |
sys: Initial import of analytical object dump (od) module
I was fed up to always rewrite object dumps.This introduces a module for this. Might also be useful to analyse output in wireshark