Sponsored Content
Top Forums Programming 64 bit code debugging using gdb and ddd Post 302891993 by Praveen_218 on Monday 10th of March 2014 07:51:24 AM
Old 03-10-2014
For small applications the same would work to an extent but when it requires to examine a piece of memory located at addresses under truly 64-bit address space (say, >32-bit addressable value) then the issues would start creeping in; as the 32-bit GDB would have variable size of 32-bit and the value of the 64-bit address would be rounded-off when assigned to the variable making altogether a different address at all. Would crash.

It'll print variables and you can step through the code as the same is treated as char * .

Last edited by Praveen_218; 03-10-2014 at 09:01 AM.. Reason: Typo
This User Gave Thanks to Praveen_218 For This Post:
 

9 More Discussions You Might Find Interesting

1. Programming

Debugging 64bit code with gdb and ddd in AIX

I'm trying to use the GDB debugger and DDD to debug 64bit code. It seems that the AIX toolkit gdb version 6.0 works with 64bit code. But the ddd tool when running gdb gives the following errors : Starting program: <my binary> <my params> warning: "": not in executable format: There is an input... (2 Replies)
Discussion started by: bean66
2 Replies

2. Programming

Debugging a running process in GDB

Hi , Any gdb user could see my problem. Let me describe what i want to do. i have a test utility to send message to running process. My interest is to go through to functions calls when my test case starts. In a simple way i want have a code walk for a particular scenario of a test... (1 Reply)
Discussion started by: meet123321
1 Replies

3. Programming

ddd/gdb debugger problem

I hope this is the right thread - not sure if it belongs in the Linux forum. Anyway, I'm having an issue with ddd and gdb. When using ddd to run gdb, there are extra parameters being appended, and my program is picking them up. I'm running on Ubuntu 11.04... Here's my command line entry - ... (1 Reply)
Discussion started by: jalburger
1 Replies

4. UNIX for Advanced & Expert Users

DDD and GDB rereads ~/.cshrc

Who know why GDB reads my ~/.cshrc again when I type "run" command? Same happends when run DDD debugger (it runs GDB inside) I need the program to inherit the environment from the current shell. How to disable this behavior? I use GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5_6.2) (3 Replies)
Discussion started by: baruchgu
3 Replies

5. UNIX for Dummies Questions & Answers

DDD is waiting for GDB to get Ready

Hello, I'm attempting to use the DDD program. After launching it from the shell I try to set a breakpoint on a source code file and when I click run it hangs and says Waiting until GDB gets ready. I cannot do anything inside the program except quit (and even that takes a while). Can someone tell... (3 Replies)
Discussion started by: lamentofking
3 Replies

6. UNIX for Dummies Questions & Answers

GDB Debugging Problem

I have added some code in my file. I have created executable rpm file of our code and also I have created debuginfo and debugsource files and installed all three. But when I debug in gdb I see the the code changes in soucre file. But the break point does not hit at that place as if it did not... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

7. Red Hat

Gdb error while debugging core file

Hi, I am trying to analyze one core file on my RHEL 6.5, but I am getting below error related to the core file. So I am not getting any stack trace about the crash. # gdb MyDebugBin /var/core/MyDebugBin.27005 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free... (2 Replies)
Discussion started by: sanzee007
2 Replies

8. AIX

Gdb on a 64 bit executable - cannot access memory

Hi, Can anyone explain this please..... A simple test program... ### snip #include <stdio.h> main() { static int n; n = 6; printf("hello %d\n", n); n=7; } ### snip 64 bit compile/link.... (2 Replies)
Discussion started by: bagpussnz
2 Replies

9. Programming

Best guide or video for gdb <register level debugging>

would like to know best guide or document for gdb for different architectures x86 , power pc etc.. would like to understand how to debug segmentation faults because of stack corruption .. understand utilities ELF , objdump etc.. please guide me (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies
ddi_dma_cookie(9S)					    Data Structures for Drivers 					ddi_dma_cookie(9S)

NAME
ddi_dma_cookie - DMA address cookie SYNOPSIS
#include <sys/sunddi.h> INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). DESCRIPTION
The ddi_dma_cookie_t structure contains DMA address information required to program a DMA engine. The structure is filled in by a call to ddi_dma_getwin(9F), ddi_dma_addr_bind_handle(9F), or ddi_dma_buf_bind_handle(9F), to get device-specific DMA transfer information for a DMA request or a DMA window. STRUCTURE MEMBERS
typedef struct { union { uint64_t _dmac_ll; /* 64 bit DMA address */ uint32_t _dmac_la[2]; /* 2 x 32 bit address */ } _dmu; size_t dmac_size; /* DMA cookie size */ uint_t dmac_type; /* bus specific type bits */ } ddi_dma_cookie_t; You can access the DMA address through the #defines: dmac_address for 32-bit addresses and dmac_laddress for 64-bit addresses. These macros are defined as follows: #define dmac_laddress _dmu._dmac_ll #ifdef _LONG_LONG_HTOL #define dmac_notused _dmu._dmac_la[0] #define dmac_address _dmu._dmac_la[1] #else #define dmac_address _dmu._dmac_la[0] #define dmac_notused _dmu._dmac_la[1] #endif dmac_laddress specifies a 64-bit I/O address appropriate for programming the device's DMA engine. If a device has a 64-bit DMA address reg- ister a driver should use this field to program the DMA engine. dmac_address specifies a 32-bit I/O address. It should be used for devices that have a 32-bit DMA address register. The I/O address range that the device can address and other DMA attributes have to be specified in a ddi_dma_attr(9S) structure. dmac_size describes the length of the transfer in bytes. dmac_type contains bus-specific type bits, if appropriate. For example, a device on a PCI bus has PCI address modifier bits placed here. SEE ALSO
pci(4), sbus(4), sysbus(4), ddi_dma_addr_bind_handle(9F), ddi_dma_buf_bind_handle(9F), ddi_dma_getwin(9F), ddi_dma_nextcookie(9F), ddi_dma_attr(9S) Writing Device Drivers SunOS 5.10 30 Sep 1996 ddi_dma_cookie(9S)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy