Programming :: Gdb Reports - Cannot Access Memory At Address 0x8049088

Jul 11, 2011

Kernel 2.6.21.5, slackware 12.0
nasm 2.03.01
ld 2.17
GNU gdb 6.6

This GDB was configured as "i486-slackware-linux".

Code:

What could the cause of the message output by gdb possibly be? Reading some tutorials, I've learn the flat memory model is used in linux. So, in particular, I needn't care about the DS segment register.

Also, line 7 in the listing above, suggests nasm is assuming 32-bit addressing and so, I think it is using the flat memory model.

View 3 Replies


ADVERTISEMENT

Programming :: Access At Physical Address - I/O Address In My Map Memory?

Dec 17, 2008

When I try to access at physical address (0xD0000), we known that it is necessary to convert physical address to virtual address using function IOREMAP(0xD0000, 1024) and return me 0xC00D0000.

Now our doubt is when I have a board with I/O in address 0x150, is it necessary to convert this address to other virtual address??? or with inb(0x150) return me state of I/O in this address? How can I known where is this I/O address in my map memory?

View 7 Replies View Related

Programming :: Shared Memory Address Area In Process Address Space?

Feb 21, 2011

if i attach a shared memory to my process whch part of the address space it will add(like stack, heap, data, code...).

View 3 Replies View Related

General :: Virtual Address To Physical Memory Access ?

Feb 21, 2010

A process is trying one access to memory, for example through an array (ex.: vect[0]=123. What happens?

Here below what I guess but I'm not sure and accept any comment (please, distinguish between "the system" and "the CPU" in case).

Let's suppose swapping to disk disbled.

We have two scenarios: without and with cache.

If no cache is present in the system:
1. The CPU must discover the phys addr of vect[0] virtual addr. To do that, has to read from 3 (or 2 depending on the system?) pages tables, stored in memory as well.
2. The CPU writes to the final address.

These mean 4 memory accesses.

If cache is present:
1. Like above but, if the pages tables are in cache, we have 3 accesses to that.
2. If the req. page is not in cache, it's reads from ram and transferred to it. Afterwards, cache is written.
In the best case we have 4 cache accesses.

View 2 Replies View Related

Programming :: Shared Memory - Should They Show The Same Address?

Mar 17, 2010

So I'll try to be brief and to the point here: I've got a couple of C / C++ apps that communicate with one another via shared memory. These worked completely fine until.. well, about twenty minutes ago when I finished making some network card changes and suddenly, I've got a weird problem going on. At one point, Parent app waits for Child app to set a boolean indicating it's finished initialization. This worked fine the last time I ran this app up (a few days ago). But right now, the shared flag never seems to get triggered (I've added a printf("Waiting..."); in Parent app until the flag is set). All the code leading up to it being set in Child app seem to be running smoothly, so I tried spitting out the addresses of the shared memory locations. The addresses mapped by Parent app and Child app are different; this seemed odd, so I went back and wrote a simple miniature app that just opened a shared structure on my own box, and I get the same thing - different addresses - but the miniature apps work just fine.

Is it normal for a shared memory space to be mapped to two different addresses across two processes?

If so, does anyone have any idea what might be the issue at hand with my Parent / Child app scenario? The Child creates the shared memory, the Parent has a wait before it opens it, and if it doesn't exist should fail (opening with PROT_READ | PROT_WRITE)... it doesn't fail so it's evidently there.

All of this worked until literally just a few hours ago and I made some changes to my network cards, and I can't even imagine how that could have changed whether or not shared memory mapping worked...

View 2 Replies View Related

Programming :: Calculate Flash Memory End Address Of A Certain File?

Mar 9, 2011

how to calculate (if possible) the end address of an image file in a flash memory. I'm trying to create a checksum and checkheader function and the info that I got is the file's offset, how many sector it consumes and its size. I kinda need the end address, sad thing is, I don't know how to calculate it.test.img's start address is 0, the size is 0x20000 and consumes 3 sectors.

View 6 Replies View Related

Programming :: Seg Fault. Memory Address Not Being Passed To Function?

Apr 19, 2010

I am writing a game in C with SDL. I can successfully display one image on the screen and animate it. However, I am having a lot of issues getting the background to display using the same method. I was asking for help on SDL related forums, but I determined that the issue is not SDL related, and it is actually a pointer issue. However, I can't find where I'm going wrong.

Code:
#include <SDL/SDL.h>
struct image

[code]...

View 4 Replies View Related

Programming :: Find Physical Address Of Memory Provided By Kmalloc

Oct 22, 2009

I allocated a chunk of memory using kmalloc in a Device Driver. Kmalloc provides a pointer to the allocated memory. This is one of my first few drivers.

I assume that the address returned is a Virtual address. I need to find the physical address of the memory location. I am working on an Intel 64 bit Fedora machine. I used the virt_to_phys() routine present in <asm/io_64.h>. I found that this routine returns an unsigned long value (32 bit) instead of an unsigned long long value (64 bit). Moreover, it seems that it simply returns the address - OFFSET instead of extracting the value in the page tables.

So is there any function / system call in Linux which will allow me to see the actual physical address on the Intel 64 arch.

View 3 Replies View Related

Programming :: How To Do A Direct Memory Access

Jul 26, 2011

I have a single board computer previously running DOS. I recently made Linux running on it. Now that the system is running Linux, I have to translate the code that was supported by DOS. The code has segments that allow direct access of memory mapped registers through the macro _MK_FP and do read/write. I have read that where DOS allows this kind of direct memory access, Linux does not. Is there a way to do this in Linux?

View 6 Replies View Related

Programming :: Access In-memory Structure And Its Members?

Dec 13, 2010

I am implementing c program to access ext3 file system's metadata. I want to know how to access members of the in-memory superblock structure. I am able access on-disk ext3_super_block structure but dont know how to access in- memory structure and its members.

View 1 Replies View Related

Programming :: Access Another Process's Memory With A Twist?

Jul 31, 2010

I have been looking for a method for a while now that would allow me to access another process's memory without causing it to freeze. But with all of my googling I have found nothing

so, my question is: Is there a way to not lock a process while accessing it's "/proc/[PID]/mem" interface?

View 3 Replies View Related

General :: Application Virtual Address Space Memory Allocation - Memory Does Not Get Free

Apr 20, 2010

I am using malloc and frees a lot in my program. It shows its allocated but when i remove it doesnt show as the memory is removed(I am using the top command to view VIRT memory usage). If this continously grows what would happen to my program (Will it go out of memory?)

View 4 Replies View Related

Software :: Accessing Memory Address Outside Standard Memory

Nov 22, 2009

I am writing an application that wants to access periphals registers outside the standard (allowed) memory area.

Doing so gets me "segmentation fault".

I know, this is natural behaviour.

One way of getting around this is writing the module which has to be loaded by linux. I will consider this some time later.

For now, I want to come to some quick result and allow linux or gcc compiler to write to those memory areas of periphals. Is there a direct way to do so?

View 3 Replies View Related

Programming :: Access The Address Of A Character Pointer?

Jul 12, 2010

i was trying to access the address of the character pointer it gives me the values stored in the variable.

Code: #include<iostream>
using namespace std;
int main()
{
char *i;

[Code]....

why is my code not giving the address of the variable i when it is a character pointer.

View 2 Replies View Related

Programming :: Access Not Within Mapped Region At Address

Jan 28, 2011

I am receiving that error through Valgrind, I don't know the meaning of the error so I don't know what to check.

View 2 Replies View Related

General :: Virtual Memory Address To Physical Address?

Apr 13, 2010

How can I get the physical address corresponding to a virtual address in linux by using /proc file system

View 1 Replies View Related

Slackware :: Installed The Latest Changes To Current - X Crashes And Reports A Segmentation Fault, Address Nil

Nov 14, 2010

X crashes and reports a segmentation fault, address nil. I've been using the generic Radeon driver without any problems, until now.

View 14 Replies View Related

Programming :: Access/Print A C Variable "as It Is Stored In The Memory"?

Oct 23, 2010

I would like to access/print a C Variable of any type "as it is stored in the memory". I would expect the output to be an array of bits. Whats the simplest/shortest way to do that?

View 14 Replies View Related

Debian :: Tool For Squid Reports (not SARG) - Generate Less Amount Of Files - Optimal Is To Save Reports To The Database

May 9, 2011

I got the following task from my boss. I have to find out if there is some alternative tool for create reports from Squid except SARG. Now, we use SARG, but my boss told to me, that the main problem of SARG is, that SARG generate huge amount files, which cause problems during migration our servers. He told to me the following condition for change of current tool (SARG):

* standard package of Debian
* generate less amount of files, optimal is to save reports to the database

So I would like to ask you if you know about some tool (I can not find some by google)... and the best would be if you told to me some practical experiences.

View 1 Replies View Related

Programming :: Memory Leaks - Glibc Detected - ./SuffixTree: Malloc() - Memory Corruption - 0x00

Mar 21, 2011

I am new to C and linux. My code below does arbitary writes but I cant figure out where or how it does it.

I am calling the insertNode() function with seq = 'MISSISSPPI$' and alphabets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ$'

Code:

Weird behaviour I should mention is that when I check for NULL pointer in node->child[index], the unassigned values are not null anymore, they point to arbitary memory.

View 12 Replies View Related

Programming :: Write A Script That Can Show Me Total Memory Vs Used Memory?

Apr 13, 2010

How do I write a script for my Linux that can show me total memory vs used memory and have it email me results if it's over 70 percent?

View 2 Replies View Related

Programming :: SHM Memory Counted As Cache Memory With Kernel 2.6.18?

Aug 25, 2010

Is that possible that SHM shared memory is counted as cache memory on Linux with kernel 2.6.18?If find it really odd since this memory is not file backed, but I have a piece of code that loads data using shm_open+mmap, and it generates an amount of cache memory in /proc/meminfo that corresponds exactly to the amount of shared memory (I load that data from a file but I am using posix_fadvise(fd,0,0,POSIX_FADV_DONTNEED) to ensure this file is not cached and I made sure that it is working as expected). As far as I know SHM memory was not tagged as cache memory with kernel 2.6.9.If it is the case it is really unfortunate since normally cache memory can be considered to be part of the "available" memory since it can be flushed promptly but this is clearly not the case with SHM memory... Is there an easy way to get the total amount of used SHM memory on a system?

View 4 Replies View Related

Programming :: Pass Ip Address, Port Address And Some Parameters From Command Line?

Apr 1, 2011

I want to pass ip address,port address and some parameters from command line using python script.The ip address and port address for establishing socket connection and remaining parameters to execute different connection.

View 1 Replies View Related

Programming :: E2fsck Reports - But Mount Warns Of Errors

Nov 25, 2010

In this case what is the return value of mount. I want to run e2fsck only when either mount fails or mount succeeded but with errors . Is there some way to detect this situatin "mounting fs with errors" in code/script .

View 6 Replies View Related

Programming :: Physical Versus Virtual Mac Address And Mac Address From NIC's Firmware?

Apr 6, 2011

I need a small shell based program that prints the mac address of physical ethernet adapter from it's firmware. I need this utility for license generation and appliance activation. I have tried several example but none of them is flawless, The easiest method I have found is to parse the output of "ifconfig" command but it has also some drawbacks.

1. Firstly program should differentiate between physical and virtual adapters. Physical means installed on board(wired or wireless) or installed additionally. Virtual adapters are those created by VPN or created by virtualization apps such as VirtualBox/VMWare etc. I am not interested in virtual ones.

2. In case of more them one physical adapters(wired and wireless), it should print the mac address and description(name & vendor) of both/all adapters.

3. If media is disconnected then also it should be able to read the mac address and description(name, vendor) of card.

4. This one is bit complex. I know that 'ethtool' can show you the universal mac address but it's limited to use only 2 types of drivers and won't work in all cases.

View 2 Replies View Related

Programming :: Translate Virtual Address To Physical Address In Application?

Nov 18, 2009

I want to translate the virtual address to physical address in linux C application, how to do that?

View 1 Replies View Related

Programming :: Write A Bash Script That Will Make Some Web Stats Reports

Jun 23, 2010

I'm planing to write a bash script that will make some web stats reports and I'm stuck on beginning because I don't know how can I read a directory content, put everything in a variable, compare the variable value with current date and go further.More specific ...

I have /var/apache/log/. Here I have access logs on date ( like access.log.24.06.2010.gz and so on ).

How can I do to automatically zgrep (in a bash script) last day .gz ??

View 3 Replies View Related

Ubuntu :: Mikrotik - Control Access To Bind Mac Address With Ip Address And Control The Band Width For Individual Connection

Feb 14, 2011

i have a xeon machine with ubuntu os machine specification is 3gb RAM 3 scsi hard drives each 73gb it have two ethernet cards one ethernet card is connected with adsl modem and the second is connected with LAN. now what is mikrotik doing for me is control access to bind mac adress with ip adress and control the band width for induvisual conection.

View 2 Replies View Related

Hardware :: Obtain A Real Memory Address From User Space - Mmap() And /dev/mem

Feb 25, 2010

I'm running an embedded Linux kernel, and I want to obtain a real memory address from user space. After goggeling a little, I found that the only way was to use mmap to access /dev/mem. But I never used mmap. I want to load a program in memory, in order to make it available from another processor, that has access to the DDR, but not to the flash memory where program is stored. Here is the code I use:

Code: // Open file and get its size
FILE* program = fopen(argv[3],"rb");
fseek(program, 0, SEEK_END);
long program_size = ftell(program);
fseek(program, 0, SEEK_SET);
// Prepare memory to copy it in
void* program_address = malloc(program_size+1);
FILE* memory_stream = fmemopen(program_real_address, program_size + 1, "wb");
[Code]....

View 5 Replies View Related

General :: Finding The Memory Address(in FLASH) Of A Command In Shell Script?

Mar 29, 2011

If i have a shell script to run on a Linux unit, which has a command to Reset(or say upgrade) the unit in between the script.Is it possible to find out the memory address of the next waiting command so that i can store the address to any environment variable in flash , then after Reset will continue Run from the stored address.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved