Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
DiSL
DiSL
Commits
18c18d6b
Commit
18c18d6b
authored
Mar 22, 2013
by
Lubomir Bulej
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DiSL-Agent: Cosmetic changes, set eol-style to native.
parent
bd449e19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
src-agent/dislagent.c
src-agent/dislagent.c
+11
-11
src-agent/dislagent.h
src-agent/dislagent.h
+16
-16
src-agent/jvmtiutil.c
src-agent/jvmtiutil.c
+1
-1
No files found.
src-agent/dislagent.c
View file @
18c18d6b
...
...
@@ -155,16 +155,16 @@ __instrument_class (
.
control
=
(
unsigned
char
*
)
class_name
,
.
classcode
=
class_def
->
class_bytes
,
};
//
struct
connection
*
conn
=
network_acquire_connection
();
message_send
(
conn
,
&
request
);
struct
message
response
;
message_recv
(
conn
,
&
response
);
network_release_connection
(
conn
);
//
// Check if error occurred on the server.
// The control field of the response contains the error message.
...
...
@@ -178,11 +178,11 @@ __instrument_class (
exit
(
ERROR_SERVER
);
}
//
// Update the class definition and signal
modified class if
//
an
y class code has been returned.
If not, the class has
// not been modified.
// Update the class definition and signal
that the class has been
//
modified if non-empt
y class code has been returned.
Otherwise,
//
signal that the class has
not been modified.
//
if
(
response
.
classcode_size
>
0
)
{
class_def
->
class_byte_count
=
response
.
classcode_size
;
...
...
@@ -432,9 +432,9 @@ Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
.
can_redefine_any_class
=
1
,
.
can_generate_all_class_hook_events
=
1
,
};
jvmtiError
error
=
(
*
jvmti
)
->
AddCapabilities
(
jvmti
,
&
caps
);
check_jvmti_error
(
jvmti
,
error
,
"failed to add
required JVMTI
capabilities
.
"
);
check_jvmti_error
(
jvmti
,
error
,
"failed to add capabilities"
);
// configure agent and init connections
...
...
@@ -453,7 +453,7 @@ Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
};
error
=
(
*
jvmti
)
->
SetEventCallbacks
(
jvmti
,
&
callbacks
,
(
jint
)
sizeof
(
callbacks
));
check_jvmti_error
(
jvmti
,
error
,
"failed to register
JVMTI
event callbacks"
);
check_jvmti_error
(
jvmti
,
error
,
"failed to register event callbacks"
);
// enable event notification
...
...
src-agent/dislagent.h
View file @
18c18d6b
#ifndef _DISLAGENT_H
#define _DISLAGENT_H
#include <jvmti.h>
#ifdef __cplusplus
extern
"C"
{
#endif
JNIEXPORT
jint
JNICALL
Agent_OnLoad
(
JavaVM
*
jvm
,
char
*
options
,
void
*
reserved
);
#ifdef __cplusplus
}
#endif
#endif
/* _DISLAGENT_H */
#ifndef _DISLAGENT_H
#define _DISLAGENT_H
#include <jvmti.h>
#ifdef __cplusplus
extern
"C"
{
#endif
JNIEXPORT
jint
JNICALL
Agent_OnLoad
(
JavaVM
*
jvm
,
char
*
options
,
void
*
reserved
);
#ifdef __cplusplus
}
#endif
#endif
/* _DISLAGENT_H */
src-agent/jvmtiutil.c
View file @
18c18d6b
...
...
@@ -58,7 +58,7 @@ jvmti_redefine_class (
}
//
jvmtiClassDefinition
new_classdef
=
{
.
klass
=
class
,
.
class_byte_count
=
class_def
->
class_byte_count
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment