Re: Problems marshalling an any
- From: Sebastian Wilhelmi <wilhelmi ira uka de>
- To: orbit-list gnome org
- Subject: Re: Problems marshalling an any
- Date: Wed, 04 Oct 2000 14:05:31 +0200
Hi Marc,
> No, I'm not using the ORBit event server. I noticed in the documentation
> that it wasn't ready.
Ah, ok, so I humiliated myself for nothing ;-)
> The problems I'm having now are related to sending an 'any' value across.
> I'm currently using the test-any-client/server to track down what's going on
> and found what's happening.
>
> Snippet from ORBit_marshal_value() in corba_any.c :
> case CORBA_tk_string :
> ulval = strlen(*(char **)*val) + 1;
>
> *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_POINTER);
>
> giop_send_buffer_append_mem_indirect_a(buf,
> &ulval,
> sizeof(CORBA_unsigned_long));
> giop_message_buffer_append_mem(GIOP_MESSAGE_BUFFER(buf), *(char
> **)*val, ulval);
>
> For marshalling the data, the ALIGN_ADDRESS(addr,boundary) macro is used.
> However in the config.h file I have a #define ALIGNOF_CORBA_POINTER 0 (All
> other ALIGNOF_ defines are also 0). Using this I invariably get as result 0
> and the program crashes when invoking giop_message_buffer_append_mem().
>
> So, I should probably alter these definitions. Since I cannot run the
> configure script on OpenVMS, could you mail me your settings (and probably
> CPU type) to use as a starting point ?
These are the values for i586-pc-linux and say, how the different types have
to be aligned in memory.
#define ALIGNOF_CORBA_BOOLEAN 1
#define ALIGNOF_CORBA_CHAR 1
#define ALIGNOF_CORBA_DOUBLE 4
#define ALIGNOF_CORBA_FLOAT 4
#define ALIGNOF_CORBA_LONG 4
#define ALIGNOF_CORBA_LONG_DOUBLE 4
#define ALIGNOF_CORBA_LONG_LONG 4
#define ALIGNOF_CORBA_OCTET 1
#define ALIGNOF_CORBA_SHORT 2
#define ALIGNOF_CORBA_STRUCT 1
#define ALIGNOF_CORBA_UNSIGNED_LONG 4
#define ALIGNOF_CORBA_UNSIGNED_LONG_LONG 4
#define ALIGNOF_CORBA_UNSIGNED_SHORT 2
#define ALIGNOF_CORBA_WCHAR 2
#define ALIGNOF_CORBA_POINTER 4
You can test for these alignments similiar to the test AC_CHECK_ALIGNOF in
configure.in
Bye,
Sebastian.
--
Sebastian Wilhelmi | här ovanför alla molnen
mailto:wilhelmi ira uka de | är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]