03-14-2014
Scaling down to 32-bit is not an option as application is currently running as 32-bit and we wanted to make it a 64-bit application.
In any case I just ignored gdb and built ddd in 64bit and this is able use the 32-bit gdb and work fine to debug 64-bit application.
I'm able to malloc, examine pointers etc. and all show 64-bit addressing correctly. So I guess it is not a problem.
9 More Discussions You Might Find Interesting
1. Programming
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
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
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
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
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
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
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
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
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
LEARN ABOUT MINIX
ddi_model_convert_from
ddi_model_convert_from(9F) Kernel Functions for Drivers ddi_model_convert_from(9F)
NAME
ddi_model_convert_from - determine data model type mismatch
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
uint_tddi_model_convert_from(uint_t model);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
model The data model type of the current thread.
DESCRIPTION
ddi_model_convert_from() is used to determine if the current thread uses a different C Language Type Model than the device driver. The
64-bit version of Solaris will require a 64-bit kernel to support both 64-bit and 32-bit user mode programs. The difference between a
32-bit program and a 64-bit program is in its C Language Type Model: a 32-bit program is ILP32 (integer, longs, and pointers are 32-bit)
and a 64-bit program is LP64 (longs and pointers are 64-bit). There are a number of driver entry points such as ioctl(9E) and mmap(9E)
where it is necessary to identify the C Language Type Model of the user-mode originator of an kernel event. For example any data which
flows between programs and the device driver or vice versa need to be identical in format. A 64-bit device driver may need to modify the
format of the data before sending it to a 32-bit application. ddi_model_convert_from() is used to determine if data that is passed between
the device driver and the application requires reformatting to any non-native data model.
RETURN VALUES
DDI_MODEL_ILP32 A conversion to/from ILP32 is necessary.
DDI_MODEL_NONE No conversion is necessary. Current thread and driver use the same data model.
CONTEXT
ddi_model_convert_from() can be called from any context.
EXAMPLES
Example 1: : Using ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications.
The following is an example how to use ddi_model_convert_from() in the ioctl() entry point to support both 32-bit and 64-bit applications.
struct passargs32 {
int len;
caddr32_t addr;
};
struct passargs {
int len;
caddr_t addr;
};
xxioctl(dev_t dev, int cmd, intptr_t arg, int mode,
cred_t *credp, int *rvalp) {
struct passargs pa;
switch (ddi_model_convert_from(mode & FMODELS)) {
case DDI_MODEL_ILP32:
{
struct passargs32 pa32;
ddi_copyin(arg, &pa32, sizeof (struct passargs32), mode);
pa.len = pa32.len;
pa.address = pa32.address;
break;
}
case DDI_MODEL_NONE:
ddi_copyin(arg, &pa, sizeof (struct passargs), mode);
break;
}
do_ioctl(&pa);
....
}
SEE ALSO
ioctl(9E), mmap(9E), ddi_mmap_get_model(9F)
Writing Device Drivers
SunOS 5.10 8 Feb 2001 ddi_model_convert_from(9F)