@@ -139,46 +139,48 @@ static void gdb_open(CPUState *cs, gdb_syscall_complete_cb complete,
139
139
140
140
gdb_open_complete = complete ;
141
141
gdb_do_syscall (gdb_open_cb , "open,%s,%x,%x" ,
142
- fname , len , (target_ulong )gdb_flags , (target_ulong )mode );
142
+ (uint64_t )fname , (uint32_t )len ,
143
+ (uint32_t )gdb_flags , (uint32_t )mode );
143
144
}
144
145
145
146
static void gdb_close (CPUState * cs , gdb_syscall_complete_cb complete ,
146
147
GuestFD * gf )
147
148
{
148
- gdb_do_syscall (complete , "close,%x" , (target_ulong )gf -> hostfd );
149
+ gdb_do_syscall (complete , "close,%x" , (uint32_t )gf -> hostfd );
149
150
}
150
151
151
152
static void gdb_read (CPUState * cs , gdb_syscall_complete_cb complete ,
152
153
GuestFD * gf , target_ulong buf , target_ulong len )
153
154
{
154
- gdb_do_syscall (complete , "read,%x,%x,%x " ,
155
- (target_ulong )gf -> hostfd , buf , len );
155
+ gdb_do_syscall (complete , "read,%x,%lx,%lx " ,
156
+ (uint32_t )gf -> hostfd , ( uint64_t ) buf , ( uint64_t ) len );
156
157
}
157
158
158
159
static void gdb_write (CPUState * cs , gdb_syscall_complete_cb complete ,
159
160
GuestFD * gf , target_ulong buf , target_ulong len )
160
161
{
161
- gdb_do_syscall (complete , "write,%x,%x,%x " ,
162
- (target_ulong )gf -> hostfd , buf , len );
162
+ gdb_do_syscall (complete , "write,%x,%lx,%lx " ,
163
+ (uint32_t )gf -> hostfd , ( uint64_t ) buf , ( uint64_t ) len );
163
164
}
164
165
165
166
static void gdb_lseek (CPUState * cs , gdb_syscall_complete_cb complete ,
166
167
GuestFD * gf , int64_t off , int gdb_whence )
167
168
{
168
169
gdb_do_syscall (complete , "lseek,%x,%lx,%x" ,
169
- (target_ulong )gf -> hostfd , off , (target_ulong )gdb_whence );
170
+ (uint32_t )gf -> hostfd , off , (uint32_t )gdb_whence );
170
171
}
171
172
172
173
static void gdb_isatty (CPUState * cs , gdb_syscall_complete_cb complete ,
173
174
GuestFD * gf )
174
175
{
175
- gdb_do_syscall (complete , "isatty,%x" , (target_ulong )gf -> hostfd );
176
+ gdb_do_syscall (complete , "isatty,%x" , (uint32_t )gf -> hostfd );
176
177
}
177
178
178
179
static void gdb_fstat (CPUState * cs , gdb_syscall_complete_cb complete ,
179
180
GuestFD * gf , target_ulong addr )
180
181
{
181
- gdb_do_syscall (complete , "fstat,%x,%x" , (target_ulong )gf -> hostfd , addr );
182
+ gdb_do_syscall (complete , "fstat,%x,%lx" ,
183
+ (uint32_t )gf -> hostfd , (uint64_t )addr );
182
184
}
183
185
184
186
static void gdb_stat (CPUState * cs , gdb_syscall_complete_cb complete ,
@@ -191,7 +193,8 @@ static void gdb_stat(CPUState *cs, gdb_syscall_complete_cb complete,
191
193
return ;
192
194
}
193
195
194
- gdb_do_syscall (complete , "stat,%s,%x" , fname , len , addr );
196
+ gdb_do_syscall (complete , "stat,%s,%lx" ,
197
+ (uint64_t )fname , (uint32_t )len , (uint64_t )addr );
195
198
}
196
199
197
200
static void gdb_remove (CPUState * cs , gdb_syscall_complete_cb complete ,
@@ -203,7 +206,7 @@ static void gdb_remove(CPUState *cs, gdb_syscall_complete_cb complete,
203
206
return ;
204
207
}
205
208
206
- gdb_do_syscall (complete , "unlink,%s" , fname , len );
209
+ gdb_do_syscall (complete , "unlink,%s" , ( uint64_t ) fname , ( uint32_t ) len );
207
210
}
208
211
209
212
static void gdb_rename (CPUState * cs , gdb_syscall_complete_cb complete ,
@@ -223,7 +226,9 @@ static void gdb_rename(CPUState *cs, gdb_syscall_complete_cb complete,
223
226
return ;
224
227
}
225
228
226
- gdb_do_syscall (complete , "rename,%s,%s" , oname , olen , nname , nlen );
229
+ gdb_do_syscall (complete , "rename,%s,%s" ,
230
+ (uint64_t )oname , (uint32_t )olen ,
231
+ (uint64_t )nname , (uint32_t )nlen );
227
232
}
228
233
229
234
static void gdb_system (CPUState * cs , gdb_syscall_complete_cb complete ,
@@ -235,13 +240,14 @@ static void gdb_system(CPUState *cs, gdb_syscall_complete_cb complete,
235
240
return ;
236
241
}
237
242
238
- gdb_do_syscall (complete , "system,%s" , cmd , len );
243
+ gdb_do_syscall (complete , "system,%s" , ( uint64_t ) cmd , ( uint32_t ) len );
239
244
}
240
245
241
246
static void gdb_gettimeofday (CPUState * cs , gdb_syscall_complete_cb complete ,
242
247
target_ulong tv_addr , target_ulong tz_addr )
243
248
{
244
- gdb_do_syscall (complete , "gettimeofday,%x,%x" , tv_addr , tz_addr );
249
+ gdb_do_syscall (complete , "gettimeofday,%lx,%lx" ,
250
+ (uint64_t )tv_addr , (uint64_t )tz_addr );
245
251
}
246
252
247
253
/*
0 commit comments