search for: p_ptr

Displaying 4 results from an estimated 4 matches for "p_ptr".

Did you mean: a_ptr
1997 Nov 14
0
Linux IP fragment overlap bug (fwd)
...on * independent way of assembling network packets that does not rely on any of * the diverse O/S specific nomenclature hinderances (well, linux vs. BSD). */ void send_frags(int sock, u_long src_ip, u_long dst_ip, u_short src_prt, u_short dst_prt) { u_char *packet = NULL, *p_ptr = NULL; /* packet pointers */ u_char byte; /* a byte */ struct sockaddr_in sin; /* socket protocol structure */ sin.sin_family = AF_INET; sin.sin_port = src_prt; sin.sin_addr.s_addr = dst_ip; /* * Grab some memo...
2010 Jul 14
2
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi, I am trying to figure out how to read arguments of a call instruction. I had few questions based on that I have the following C Code 1 #include <stdio.h> 2 3 struct my_struct 4 { 5 int a; 6 int b; 7 }; 8 9 struct my_struct abc; 10 void p_ptr ( unsigned long j) 11 { 12 printf ( "%lx \n", j ); 13 } 14 15 void struct_ptr ( struct my_struct * s_ptr ) 16 { 17 printf ( "%p \n", s_ptr ); 18 } 19 20 int 21 main () 22 { 23 struct my_struct stack_abc; 24 p_ptr ((unsigned long) &abc); 25 stru...
2010 Jul 15
0
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Shankha, > 24 p_ptr ((unsigned long)&abc); > call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64)) > nounwind, !dbg !31 > > Q.1 At line no 24 I try to read the address of global variable abc. > The address is type casted > from struct * to int * for which ptrtoint. I g...
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
...mistake. I will reword my questions. //C code int var1; //global int a, b; foo(a, b); bar(c); generates following //LLVM IR %1 = load a; %2 = load b; call foo(%1, %2) call bar(@var1) CallInst.getOperand(1).getNameStr() on foo, returns null, but on bar returns var1. Similarly, for call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64)) nounwind, !dbg !31 CallInst.getOperand(1).getNameStr(), return abc and type returns i64, How do I figure the operand is a const expression and a cast operator was used to generate it. More generally, When I use Instruction iterator on BasicBlock, I...