Re: __NR_mmap2 in FreeBSD

2012-04-19 Thread Maninya M
dr,temp_regs.r_eax); else if (cr_options.verbose) fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); if(ptrace(PT_WRITE_D, exec_pid, (caddr_t)regs.r_eip,orig_instr)<0) die_perror("ptrace(PT_WRITE_D,...) failed after executing mmap2 system call");

Re: __NR_mmap2 in FreeBSD

2012-04-19 Thread Maninya M
er, and to all the other FreeBSD hackers on this amazing forum. Your patient replies to all my questions helped a lot! :) On 3 April 2012 02:12, John Baldwin wrote: > On Saturday, March 31, 2012 5:40:50 pm Maninya M wrote: > > Thanks. > > > > I've tried this. St

mmap segmentation fault

2012-04-12 Thread Maninya M
Hello, I want to allocate memory at a specified address location 'a' of size 'b'. I wrote code below to do it, but I'm getting a seg fault. How can I solve this? How can I get the allocated memory at the required address? int main() { unsigned int *addr,*newaddr; unsigned long a=134516736,a1; unsi

Re: __NR_mmap2 in FreeBSD

2012-03-31 Thread Maninya M
bose) fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); /* Restore original registers */ if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,...) when restoring registering after allocating memory (

Re: __NR_mmap2 in FreeBSD

2012-03-29 Thread Maninya M
fprintf(stdout,"Successfully allocated [0x%.8lx - 0x%.8lx]\n",addr,addr+size); /* Restore original registers */ if (ptrace(PT_SETREGS,exec_pid,(caddr_t)&temp_regs,0) < 0) { die_perror("ptrace(PT_SETREGS,...) when restoring registering after allocating memory (mmap2

__NR_mmap2 in FreeBSD

2012-03-26 Thread Maninya M
I am trying to convert a function written for Linux to FreeBSD. What is the equivalent of the __NR_mmap2 system call in FreeBSD? I keep getting the error because of this exception: warn("Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.",addr,temp_regs.eax

Fwd: Capture states of all processes at the same time

2012-03-19 Thread Maninya M
10:49 PM, Maninya M wrote: > > # sysctl debug.kdb.enter=1 > > > > -- > > > > But when I type that the computer hangs! > > Did you by any chance do that from a terminal window in X11 > environment? If that's the case, then kernel debugger is running

Re: Capture states of all processes at the same time

2012-03-15 Thread Maninya M
, 2012 at 11:25 AM, Maninya M wrote: >> >>> Then typed this to force a panic: >>> >>> sysctl debug.kdb.panic=1 >>> >>> The computer just hung after this, and after waiting for a while I >>> pressed >>> the reboot button. >>

Capture states of all processes at the same time

2012-03-14 Thread Maninya M
. On 14 March 2012 22:49, Artem Belevich wrote: > On Wed, Mar 14, 2012 at 9:31 AM, Maninya M wrote: > > How can I capture the states of all running processes at a particular > point > > in time? How can I retrieve this information for later use? > > Go into DDB. Do

Capture states of all processes at the same time

2012-03-14 Thread Maninya M
How can I capture the states of all running processes at a particular point in time? How can I retrieve this information for later use? -- Maninya ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To

Re: CPUID and CPU STATE

2012-03-05 Thread Maninya M
am Maninya M wrote: > > I was unable to get this information about the cpuid variable in the > > scheduler source code. > > How does cpuid get its value from the hardware? > > The cpuid is a software ID value assigned during boot. It is not > directly related to any speci

CPUID and CPU STATE

2012-03-01 Thread Maninya M
I was unable to get this information about the cpuid variable in the scheduler source code. How does cpuid get its value from the hardware? How is the CPUSTATES value obtained/changed with hardware in the source code? Which system commands for the above? -- Maninya __

OS support for fault tolerance

2012-02-14 Thread Maninya M
For multicore desktop computers, suppose one of the cores fails, the FreeBSD OS crashes. My question is about how I can make the OS tolerate this hardware fault. The strategy is to checkpoint the state of each core at specific intervals of time in main memory. Once a core fails, its previous state