diff options
| author | Po Lu | 2023-05-31 10:13:04 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-31 10:13:04 +0800 |
| commit | 57903519eb61632c4a85fbaf420109892955079a (patch) | |
| tree | 3dc2f961217870b96e0a1e96f52e9bdb331e4413 /java/debug.sh | |
| parent | 733a6776f9d665e5fd99bcc2a65c84c4360e277c (diff) | |
| download | emacs-57903519eb61632c4a85fbaf420109892955079a.tar.gz emacs-57903519eb61632c4a85fbaf420109892955079a.zip | |
Update Android port
* java/debug.sh (is_root): Go back to using unix sockets; allow
adb to forward them correctly.
* java/org/gnu/emacs/EmacsInputConnection.java
(getExtractedText): Don't print text if NULL.
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
`imSyncInProgress'.
(updateIC): If an IM sync might be in progress, avoid deadlocks.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Set `imSyncInProgress' across synchronization point.
* src/android.c (android_check_query): Use __atomic_store_n.
(android_answer_query): New function.
(android_begin_query): Set `android_servicing_query' to 2.
Check once, and don't spin waiting for query to complete.
(android_end_query): Use __atomic_store_n.
(android_run_in_emacs_thread): Compare-and-exchange flag. If
originally 1, fail.
* src/textconv.c (really_set_composing_text): Clear conversion
region if text is empty.
Diffstat (limited to 'java/debug.sh')
| -rwxr-xr-x | java/debug.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/java/debug.sh b/java/debug.sh index 339b3604810..0458003fe72 100755 --- a/java/debug.sh +++ b/java/debug.sh | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | ## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | 19 | ## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. |
| 20 | 20 | ||
| 21 | set -m | 21 | set -m |
| 22 | set -x | ||
| 22 | oldpwd=`pwd` | 23 | oldpwd=`pwd` |
| 23 | cd `dirname $0` | 24 | cd `dirname $0` |
| 24 | 25 | ||
| @@ -310,22 +311,26 @@ rm -f /tmp/file-descriptor-stamp | |||
| 310 | 311 | ||
| 311 | if [ -z "$gdbserver" ]; then | 312 | if [ -z "$gdbserver" ]; then |
| 312 | if [ "$is_root" = "yes" ]; then | 313 | if [ "$is_root" = "yes" ]; then |
| 313 | adb -s $device shell $gdbserver_bin --once \ | 314 | adb -s $device shell $gdbserver_bin --multi \ |
| 314 | "+/data/local/tmp/debug.$package.socket" --attach $pid >&5 & | 315 | "+/data/local/tmp/debug.$package.socket" --attach $pid >&5 & |
| 315 | gdb_socket="localfilesystem:/data/local/tmp/debug.$package.socket" | 316 | gdb_socket="localfilesystem:/data/local/tmp/debug.$package.socket" |
| 316 | else | 317 | else |
| 317 | adb -s $device shell run-as $package $gdbserver_bin --once \ | 318 | adb -s $device shell run-as $package $gdbserver_bin --multi \ |
| 318 | "+debug.$package.socket" --attach $pid >&5 & | 319 | "+debug.$package.socket" --attach $pid >&5 & |
| 319 | gdb_socket="localfilesystem:$app_data_dir/debug.$package.socket" | 320 | gdb_socket="localfilesystem:$app_data_dir/debug.$package.socket" |
| 320 | fi | 321 | fi |
| 321 | else | 322 | else |
| 322 | # Normally the program cannot access $gdbserver_bin when it is | 323 | # Normally the program cannot access $gdbserver_bin when it is |
| 323 | # placed in /data/local/tmp. | 324 | # placed in /data/local/tmp. |
| 324 | adb -s $device shell run-as $package $gdbserver_cmd --once \ | 325 | adb -s $device shell run-as $package $gdbserver_cmd --multi \ |
| 325 | "0.0.0.0:7654" --attach $pid >&5 & | 326 | "+debug.$package.socket" --attach $pid >&5 & |
| 326 | gdb_socket="tcp:7654" | 327 | gdb_socket="localfilesystem:$app_data_dir/debug.$package.socket" |
| 327 | fi | 328 | fi |
| 328 | 329 | ||
| 330 | # In order to allow adb to forward to the gdbserver socket, make the | ||
| 331 | # app data directory a+x. | ||
| 332 | adb -s $device shell run-as $package chmod a+x $app_data_dir | ||
| 333 | |||
| 329 | # Wait until gdbserver successfully runs. | 334 | # Wait until gdbserver successfully runs. |
| 330 | line= | 335 | line= |
| 331 | while read -u 5 line; do | 336 | while read -u 5 line; do |