Search Results

Search found 7 results on 1 pages for 'user324994'.

Page 1/1 | 1 

  • GDB question - how do I go through disassembled code line by line?

    - by user324994
    I'd like to go through a binary file my teacher gave me line by line to check addresses on the stack and the contents of different registers, but I'm not extremely familiar with using gdb. Although I have the C code, we're supposed to work entirely from a binary file. Here are the commands I've used so far: (gdb) file SomeCode Which gives me this message: Reading symbols from ../overflow/SomeCode ...(no debugging symbols found)...done. Then I use : (gdb) disas main which gives me all of the assembly. I wanted to set up a break point and use the "next" command, but none of the commands I tried work. Does anyone know the syntax I would use?

    Read the article

  • MATLAB setting matrix values in an array

    - by user324994
    I'm trying to write some code to calculate a cumulative distribution function in matlab. When I try to actually put my results into an array it yells at me. tempnum = ordered1(1); k=2; while(k<538) count = 1; while(ordered1(k)==tempnum) count = count + 1; k = k + 1; end if(ordered1(k)~=tempnum) output = [output;[(count/537),tempnum]]; k = k + 1; tempnum = ordered1(k); end end The errors I'm getting look like this ??? Error using ==> vertcat CAT arguments dimensions are not consistent. Error in ==> lab8 at 1164 output = [output;[(count/537),tempnum]]; The line to add to the output matrice was given to me by my TA. He didn't teach us much syntax throughout the year so I'm not really sure what I'm doing wrong. Any help is greatly appreciated.

    Read the article

  • GDB disas question about address values

    - by user324994
    I'm working with a binary file that I disas'd in gdb. Right now I'm just examining the return value of a function. 0x08048604 <playGame+78>: ret Is the address shown the address where ret is stored in the function? Or is it just the address of the instruction to return the ret value?

    Read the article

  • Address of array vs. address of array[0] - C language

    - by user324994
    My question is why does the address of an array differ from the address of its first position? I'm trying to write my own malloc, but to start out I'm just allocating a chunk of memory and playing around with the addresses. My code looks roughly like this: #define BUFF_SIZE 1024 static char *mallocbuff; int main(){ mallocbuff = malloc(BUFF_SIZE); printf("The address of mallocbuff is %d\n", &mallocbuff); printf("The address of mallocbuff[0] is %d\n", &mallocbuff[0]); } &mallocbuff is the same address every time I run it. &mallocbuff[0] is some random address every time. I was expecting the addresses to match each other. Can anyone explain why this isn't the case?

    Read the article

  • Help translating from assembly to C

    - by user324994
    I have some code from a function subl $24, %esp movl 8(%ebp), %eax cmpl 12(%ebp), %eax Before the code is just the 'ENTER' command and afterwards there's an if statement to return 1 if ebp eax or 0 if it's less. I'm assuming cmpl means compare, but I can't tell what the concrete values are. Can anyone tell me what's happening?

    Read the article

1