Search:

Type: Posts; User: MartinR

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. @flp1969, yes you are right there are bugs, but I...

    @flp1969, yes you are right there are bugs, but I guess you realized this is a pseudo code to just ilustrate how the encoder works

    Anyway, I have fixed the bug, it was because sometimes GDB sends...
  2. Ubuntu 16.04. As for parameters of course I use...

    Ubuntu 16.04. As for parameters of course I use the original file and the one transfered over gdb, what else could I use?

    And what is md5sum returning? Of course md5 sum of each file, again what...
  3. Let me give you some more informations then. What...

    Let me give you some more informations then. What I do is write a stub for GDB - so it parses commands (packets) that GDB sends and responds accordingly. This particular problem is with GDB's "remote...
  4. "Unescaping" certain characters from binary file

    Hello,

    I have a binary file in which some bytes were escaped according to the following rule:


    if (byte == XX || byte == YY || ...)
    {
    temp = byte;
    byte = 0x7d;
    byte+1 = tmp ^ 0x20;
  5. Replies
    6
    Views
    671

    @Niccolo but when I ask gcc to compile sing c11...

    @Niccolo but when I ask gcc to compile sing c11 it complains about unknown memcpy_s. So it is not defined.
  6. Replies
    6
    Views
    671

    memcpy and its derivatives

    Hello,

    this subject is rather about memcpy_s which is known as secure copy because it actually check for null pointers and overlapping sections. However my first question would be where is it...
  7. Signed integer overflow - undefined behaviour

    Hello,

    as in subject the overflow of signed integers is defined as *undefined* - meaning that anything can happen including program crash. I think the *undefined* part comes from the fact that...
  8. Replies
    7
    Views
    547

    @narniat: thanks good list. However this is not...

    @narniat: thanks good list. However this is not exactly what I wanted to get. I am more interested in approaches. For example lets say you encountered a problem, you ran GDB to debug it and now - do...
  9. Replies
    7
    Views
    547

    Do you debug with GDB?

    Hello,

    I am writing a GDB stub for a DSP chip. What I would like to hear from you is what kind of commands do you use and how do you debug.
    I need this as a reference for implementing features...
  10. @john.c, the exact gcc error about line 6 says...

    @john.c, the exact gcc error about line 6 says "error: initializer element is not constant".
  11. Iinitializer element is not constant - why is that?

    Hello,

    for code as below:




    #define GET_TX_BASE() DEBUG_TX_BASE
    #define DEBUG_RX_BASE 0xBE000000
    #define DEBUG_TX_BASE 0xBEFE0000
  12. Replies
    11
    Views
    1,537

    Yes the former one, I am just curious how to...

    Yes the former one, I am just curious how to define such universal type. Do you have better solution than mine, presented in first post?
  13. Replies
    11
    Views
    1,537

    Hodor, yes I must admit - byte which consist of...

    Hodor, yes I must admit - byte which consist of more than 8 bits is actually a surprise to me.



    Sure I can but this subject is more about how to define such type using standard C types - char...
  14. Replies
    11
    Views
    1,537

    Salem, thanks for the answer. john.c, where all...

    Salem, thanks for the answer.
    john.c, where all that aggression comes from? ;/
  15. Replies
    11
    Views
    1,537

    Why not? Isn't that guaranteed that char must be...

    Why not? Isn't that guaranteed that char must be 1 byte? Do you have some evidences that disclaim that?



    You misunderstood my goal or I wasn't clear enough. I need to guarantee 32 bit int type...
  16. Replies
    11
    Views
    1,537

    Create integer type that is always 32 bit

    Hello,


    I try to make integer type that will be always 32 bit wide, independent of the underlying hardware.

    Because char is always 1 byte we could arrange four chars in some way to form...
  17. Replies
    4
    Views
    597

    @Salem, thanks! Very informative as always ...

    @Salem, thanks! Very informative as always
    @john.c, it's not misunderstanding - after all an array of two chars is two byte value right? So I expected it to be addressed and stored in memory...
  18. Replies
    4
    Views
    597

    Detect byte order using array

    Hello I try to dectect byte order "Endianess" using arrays.
    If we define an array of 2 elements, in little endian element 0 shall be stored first simple comarsion of address of element 0 and 1...
  19. Replies
    2
    Views
    875

    Compiling serious C projects

    I wonder how to write clever makefile for serious C project. This task which may seems to be trivial is actually not so easy, here is why (IMHO):

    1. We can compile all source files by seraching...
  20. Got it! Thanks :)

    Got it! Thanks :)
  21. Replies
    5
    Views
    743

    Thanks for explanation guys! ;)

    Thanks for explanation guys! ;)
  22. Why const variable can not define array bounds.

    Hello,

    I found out that below code is illegal:



    const int a = 10;
    int b[a];
  23. Replies
    5
    Views
    743

    Well I think it is obvious - How can it be...

    Well I think it is obvious - How can it be accessed by other file if it has file scope in the same time?
  24. Replies
    6
    Views
    863

    Thank you very much Salem! Following this...

    Thank you very much Salem!

    Following this scheme what question would you ask? I am seeking question which probably omitted or wasn't aware of ;)
  25. Replies
    5
    Views
    743

    Linkage vs scope of a variable

    Let's say we have defined variable i as:

    int i;

    So this variable is said to have file scope and external linkage - meaning that it is visible to the end of the file in which it was defined...
Results 1 to 25 of 186
Page 1 of 8 1 2 3 4